ZenphotoCMS Forum
Error in Statistics - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Error in Statistics (/thread-9387.html)



Error in Statistics - Ganesh - 2011-12-17

Hello,

Using version 1.4.1.6 [8326] when i access to the gallery statistics i have the following messages :

Warning: Invalid argument supplied for foreach() in /home/users3/b/aaaaaaa/www/bbbbbbb/zp-core/utilities/gallery_statistics.php on line 45
Taille du cache HTML : 474,27 kB

Warning: Invalid argument supplied for foreach() in /home/users3/b/aaaaaaa/www/bbbbbbb/zp-core/utilities/gallery_statistics.php on line 45
Taille du dossier chargé : 0 octet
Taille des scripts Zenphoto : 22,77 mB

Thanks in advance.




Error in Statistics - sbillard - 2011-12-17

Change that line to read foreach(safe_glob($path."/*") as $fn) Probably glob is disabled in your PHP.




Error in Statistics - Ganesh - 2011-12-18

Thanks a lot Stephen,

Yes, register_globals is disabled, it is a prerequisite during the installation.

But after your modification i have now Fatal error: Maximum execution time of 40 seconds exceeded in /home/users3/b/baudelet/www/lecarnet/zp-core/functions.php on line 1631

And i have a good server




Error in Statistics - acrylian - 2011-12-18

If I recall correctly that is an error that is fixed in the 1.4.2 trunk already.




Error in Statistics - sbillard - 2011-12-18

glob is different from register_globals. It is a function to return a file list from a directory folder. Some sites think that it is a potential secruity threat since it could be used to look into directories global to the install. Most just disable looking global, but some sites disable the function entirely. We have simply replaced use with our own function which is "safe". That one place somehow got missed.




Error in Statistics - sbillard - 2011-12-19

The timeout you ar experiencing seems to be some kind of drectory issue. The place you are getting the timeout is where Zenphoto is reading the files in one of the folders. (We can tell which one if you let us know what has been displayed before the error.)




Error in Statistics - sbillard - 2011-12-19

Found the issue. Difference in behavior of the two functions glob() and safe_glob().

change the line under the last change to

if ($fn!='.' && $fn!='..') $ret += gallerystats_filesize_r($fn);




Error in Statistics - Ganesh - 2011-12-19

Thanks Stephen, but i have always the error

64 images
4 albums
0 commentaires

Fatal error: Maximum execution time of 40 seconds exceeded in /home/users3/b/bbbbbb/www/llllll/zp-core/functions.php on line 1631




Error in Statistics - sbillard - 2011-12-19

Maybe you can give the nightly build a try. It has the proper fix incorporated. Anyway, the failure is in examining the albums folders.




Error in Statistics - Ganesh - 2011-12-20

I will retry with the official version, because i don't really arrive to install the nightly build (same problems as an other person in the forum).




Error in Statistics - acrylian - 2011-12-20

The trunk nightly is already a release candidate of 1.4.2. By testing that you help us to sort out any possible issues for the coming 1.4.2.




Error in Statistics - Ganesh - 2011-12-20

Yes, i tried and had the same problems as the other person (see "Upgrade from 1.4.1.6 to 1.4.2 - Install problems")




Error in Statistics - acrylian - 2011-12-20

Yes, but those were apparently be a hacked site that has not been clearey completly and also again a permissions issue.