Wednesday, February 18, 2009

FireStats - Top 40 php script - guide

I have been using mt-daapd since I had the slug but I had some problems to make firestats work with it (Unfortunately, it does not have any installation procedure afaik...). If you do not know what firestats is maybe you should refer to this link. It is a very nice statistics utility for your mt-daapd server. Let us start with the guide how to make it work :)
First download the utility from here or here. Unzip the package to a directory under /var/www.
For example: /var/www/firestats

You need some packages to install if you have noe doen so...
apt-get install php5-common
apt-get install php5-sqlite

Almost done. The script is written for unslung I guess so we need to adjust some parameters. You need to change some of the lines in functons.php. I suppose your database is sqlite3 and the database file is "/var/cache/mt-daapd/songs3.db"
Open functions.php
nano /var/www/firestats/functions.php

Find the line


uncomment it and change to

Also find the lines (total two lines)
$config['FIREFLY']['DSN'] = "sqlite:/opt/var/mt-daapd/songs3.db";

and change to
$config['FIREFLY']['DSN'] = "sqlite:/var/cache/mt-daapd/songs3.db";

The last thing to do, open the php.ini (/etc/php/apache/php.ini) file and add the lines below to the list of extensions.

I guess you are done. Open your webbrowser and check if it works...
(This guide is for firestats ver. 1.28)


  1. Hi, it is possible that you can make the available for me, because the site above seems not to respond. And I have not found any other site which provides this file.


  2. I put an alternative link for you :). Cheers

  3. I cannot find the php.ini at
    In my slug the path seems to be at
    I added the two extensions but the Statistics tab would not appear. What can I do ?

  4. It looks like

    Just edit this file and add the linus under
    ; Dynamic Extensions ;

    It should be ok.

    You should find the file at

  5. Thanks for the quick reply. Still it is the same. I cannot see the statistics tab. The two files and forestats.tar are different. The .tar file has additional files (.dll and .ini). Do I need them ? When I go to http://your.address/firestats I get the file listings and when I run the firestats.php I get and error

    Warning: include(./summary.php) [function.include]: failed to open stream: Permission denied in /var/www/firestats/firefly.php on line 20

    Warning: include() [function.include]: Failed opening './summary.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/firestats/firefly.php on line 20