Error in Statistics

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.

Comments

  • Change that line to read `foreach(safe_glob($path."/*") as $fn)` Probably `glob` is disabled in your PHP.
  • 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
  • acrylian Administrator, Developer
    If I recall correctly that is an error that is fixed in the 1.4.2 trunk already.
  • `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.
  • 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.)
  • 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);`
  • 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
  • Maybe you can give the nightly build a try. It has the proper fix incorporated. Anyway, the failure is in examining the albums folders.
  • 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).
  • acrylian Administrator, Developer
    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.
  • 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")
  • acrylian Administrator, Developer
    Yes, but those were apparently be a hacked site that has not been clearey completly and also again a permissions issue.
Sign In or Register to comment.