FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › Add-on Software › FireStats – Top 40 php script (now with added charts)
- This topic has 175 replies, 17 voices, and was last updated 15 years, 11 months ago by wwarren.
-
AuthorPosts
-
15/12/2007 at 7:36 PM #14769IrisParticipant
@sonichouse wrote:
If you were running 1.18, it should show an error message rather than the one displayed.
Can you check the first few lines of QuerytoTable (line 100)
It should say
function QueryToTable($dbh, $query, $output=1, $title=null, $mode=null,$graph=0)
{
$imgDir="img/";
$minScale=0;
$maxScale=10;
// Execute Query
$result=$dbh->query($query);
// Check for valid result set
if(!$result)
{
print("Unable to execute: $query
");
return;
}
No it doesn’t – I even re-downloaded.
And, Functions.PHP at the top defines the version variable as 1.17?
Maybe upload a fresh zip.
Iris
15/12/2007 at 7:41 PM #14770sonichouseParticipantJust downloaded it to a seperate machine – was fine.
try this one functions.php
15/12/2007 at 7:46 PM #14771IrisParticipantCorrect version now. Error reads:
Unable to execute: select Date, sum(Added) as Added from ( select date(time_added, ‘unixepoch’, ‘localtime’) as “Date”, count(*) as Added from songs where date(time_added, ‘unixepoch’, ‘localtime’) between date(‘now’ , ‘-14 day’, ‘localtime’) and date(‘now’ , ‘localtime’) group by 1 union all select date(‘now’ , ‘-00 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-01 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-02 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-03 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-04 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-05 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-06 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-07 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-08 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-09 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-10 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-11 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-12 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-13 day’, ‘localtime’), 0 ) group by 1 order by 1 desc;
Iris
15/12/2007 at 7:50 PM #14772sonichouseParticipantThat query works fine for me on my machine.
can you try
select date(time_added, 'unixepoch', 'localtime') as "Date", count(*) as Added from songs where date(time_added, 'unixepoch', 'localtime') between date('now' , '-14 day', 'localtime') and date('now' , 'localtime') group by 1;
in sqlite on yours ?
/Steve
15/12/2007 at 7:56 PM #14773IrisParticipantI haven’t done direct querys to sqlite before? I’m just wondering, I see you’re using v1696 and I’m on 1586 – could that be the prob? I had tried 1696 but had to revert back due to those memory leaks Ron was trying to get a handle on. Edit: Can someone else on 1586 try this?
Iris
15/12/2007 at 7:59 PM #14774sonichouseParticipant@Iris wrote:
I haven’t done direct querys to sqlite before? I’m just wondering, I see you’re using v1696 and I’m on 1586 – could that be the prob? I had tried 1696 but had to revert back due to those memory leaks Ron was trying to get a handle on. Edit: Can someone else on 1586 try this?
Iris
The database structure is the same AFAIK betweeen the two builds.
The last played time was fixed in 1587 I think, but the date added should still work.
I am re-building my datbase in sqlite2 as we speak, see if that makes any difference.
15/12/2007 at 8:07 PM #14775IrisParticipantSonic,
I’m being summoned to get off the computer and go out so I’ll have to catch up with you later. Thanks for the help so far – like the stats.
Iris
15/12/2007 at 8:55 PM #14776sonichouseParticipant@Iris wrote:
Sonic,
I’m being summoned to get off the computer and go out so I’ll have to catch up with you later. Thanks for the help so far – like the stats.
Iris
Have a good night 🙂
This is a sqlite2 sql column alias issue.
Version 1.19 zipped and posted fixes this.
15/12/2007 at 11:11 PM #14777IrisParticipantOkay, I’m getting a timeout when doing the initial generation.
Fatal error: Maximum execution time of 30 seconds exceeded in /shares/mss-hdd/Public/Our Sites/stats/functions.php on line 108
I tried to find the value to increase to 60 secs but couldn’t. Could you take a look or suggest something I can do.
Iris
15/12/2007 at 11:31 PM #14778sonichouseParticipant@Iris wrote:
Okay, I’m getting a timeout when doing the initial generation.
Fatal error: Maximum execution time of 30 seconds exceeded in /shares/mss-hdd/Public/Our Sites/stats/functions.php on line 108
I tried to find the value to increase to 60 secs but couldn’t. Could you take a look or suggest something I can do.
Iris
On the line before try
set_time_limit(60);
All my queries return in less than 10 seconds on my slug – which one is failing on your machine ?
-
AuthorPosts
- The forum ‘Add-on Software’ is closed to new topics and replies.