FireStats – Top 40 php script (now with added charts)

FireFly Media Server Firefly Media Server Forums Firefly Media Server Add-on Software FireStats – Top 40 php script (now with added charts)

Viewing 10 posts - 141 through 150 (of 176 total)
  • Author
    Posts
  • #14829
    Anonymous
    Inactive

    I’ve been playing around with it a bit and now I’ve got this in my php error log:

    [05-Oct-2008 15:08:28] PHP Fatal error:  Class 'PDO' not found in C:Inetpubwwwrootfunctions.php on line 103

    This is an excerpt from my php.ini… which PDO extension am I missing?

    extension=php_pdo.dll
    extension=php_pdo_firebird.dll
    extension=php_pdo_mssql.dll
    extension=php_pdo_mysql.dll
    extension=php_pdo_oci.dll
    extension=php_pdo_oci8.dll
    extension=php_pdo_odbc.dll
    extension=php_pdo_pgsql.dll
    extension=php_pdo_sqlite.dll
    extension=php_pdo_sqlite_external.dll
    extension=php_pdo_user.dll
    extension=php_pdo_informix.dll
    #14830
    sonichouse
    Participant

    That seems fine to me, is the php_pdo.dll in your class path (extension_dir in php.ini) ?

    The info at http://uk.php.net/manual/en/pdo.installation.php may be of use to you ?

    #14831
    Anonymous
    Inactive

    Yes, the php_pdo.dll file is there, and I followed the instructions from php.net, although the windows install is just “copy the file to /ext and add it to the php.ini file…

    I’m getting output now, but just the nav header. My php error log is still complaining about the POD class missing…

    Any thoughts?

    #14832
    sonichouse
    Participant

    I am not running windows here, but http://www.corephp.co.uk/archives/36-A-Guide-to-using-PHP-5-Extensions-on-Windows.html suggests that even though you have the correct extension_dir specified you need to add that path to your environment variable $PATH

    #14833
    Anonymous
    Inactive

    Ok, thanks to your link, it looks like PDO is working now, but I’m getting more errors in my php log now…

    [05-Oct-2008 17:23:56] PHP Warning:  domdocument::domdocument() expects at least 1 parameter, 0 given in C:Inetpubwwwrootfunctions.php on line 113

    [05-Oct-2008 17:23:56] PHP Fatal error: Call to undefined method domdocument::load() in C:Inetpubwwwrootfunctions.php on line 114

    113 is the $xmlDoc = new DOMDocument(); line…

    function getFirefly($FFhost="cosmos", $FFport=9999)
    {
    $firefly="Firefly";

    $xmlDoc = new DOMDocument();
    $xmlDoc->load("http://$FFhost:$FFport/server-info?output=xml");
    $x = $xmlDoc->documentElement;

    foreach ($x->childNodes AS $item)
    {
    if("$item->nodeName" == "dmap.itemname")
    $firefly=$item->nodeValue;
    }

    return $firefly;
    }

    But if I go to http://cosmos:9999/server-info?output=xml I get a valid XML output…

    #14834
    sonichouse
    Participant

    Ok, one step further into the Windows abyss …

    Reading http://uk2.php.net/manual/en/domdocument.construct.php it says

    Make sure that php_domxml.dll on windows is removed before using the domdocument class as they cannot coexist.

    HTH – Steve

    For compatabilty you may want to try

    $xmlDoc = new DOMDocument('1.0', 'UTF-8');

    this works on my linux server here.

    #14835
    Anonymous
    Inactive

    It looks like it’s working now! Taking php_domxml.dll out of the php.ini did it.

    I’m assuming the charts and such start over when you reboot the system. I rebooted my server, and the historical chart of items added to the library is there, but the play history charts are all blank.

    You sir are a good man! Thanks for taking the time to help me out!

    So if anyone is wondering, it took some fooling with, but this works on Windows Home Server with IIS and PHP5.

    #14836
    sonichouse
    Participant

    The charts are stored in the img directory from memory.

    If you run refresh, this will build all of the charts. By default they are not there until it has executed each report type.

    Glad that someone other than myself is using.

    Not sure if I remember correctly, but some of the earlier builds of FF did not update the played_count, so that may be why you are not seeing any data ?

    #14837
    Anonymous
    Inactive

    Yes, That could be it. I have accurate values for “Songs”, “Playlists”, and “Albums”, but zeros for “Albums Played”, “Songs Played”, and “Unique Songs Played”…

    I’m on build svn-1586… which build are you using?

    And what’s the upgrade procedure, just install the new version of FireFly over the old one so I don’t have to recreate the database?

    #14838
    sonichouse
    Participant

    @webdes03 wrote:

    Yes, That could be it. I have accurate values for “Songs”, “Playlists”, and “Albums”, but zeros for “Albums Played”, “Songs Played”, and “Unique Songs Played”…

    I’m on build svn-1586… which build are you using?

    And what’s the upgrade procedure, just install the new version of FireFly over the old one so I don’t have to recreate the database?

    I am using 1696 with sqlite3, and I must admit I have found this very stable on linux, but I cannot vouch for it on Windows.

    As far as I can remember there were no database changes for that build, so it should be a straight replacement. I would advocate making a backup copy of the database and ini files before embarking on any upgrades first though.

    Best of luck.

Viewing 10 posts - 141 through 150 (of 176 total)
  • The forum ‘Add-on Software’ is closed to new topics and replies.