Menu

Allowed memory size exhausted

Help
2004-08-19
2013-04-08
  • Staffan Mossberg

    Hi,

    I've just installed phpAutoGallery v0.9.6 and I have a problem that I hope someone can help me with. The script seems to work fine when you go to the gallery, http://www.lillahuset.nu/gallery, but when I click on the picture, Staffan_in_action.jpg, I put in the gallery folder for test purposes I get this error message:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2560 bytes) in /home/FA04-08-07-52_mb7bdwugghfc9tbmvz4x/lillahuset.nu/public_html/gallery/__phpAutoGallery/include/Image_Toolbox.class.php on line 893

    If I instead go into the jsm folder I can click on both pictures in that folder, but if I click the 1024 resize option I get the following error messages respectively:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4096 bytes) in /home/FA04-08-07-52_mb7bdwugghfc9tbmvz4x/lillahuset.nu/public_html/gallery/__phpAutoGallery/include/Image_Toolbox.class.php on line 893

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1024 bytes) in /home/FA04-08-07-52_mb7bdwugghfc9tbmvz4x/lillahuset.nu/public_html/gallery/__phpAutoGallery/include/Image_Toolbox.class.php on line 893

    Can anyone tell me what is causing this problem and how I can fix it?

    As additional information I can say that when I installed the 0.9.0 version of the script yesterday I had the same problem (no other problems though, the installation worked right out of the box). After upgrading to the latest release nothing worked at first as most files and folders were saved with their names in all caps and my server or the script is obviously case sensitive. After renaming the all caps names to lower case the script worked. Apart from the above mentioned error that is.

    The script is really neat so I'd appreciate any and all help I can get as I don't have the programming (or other) skills necessary to figure this out by myself.

    Best regards,
    Staffan

     
    • Staffan Mossberg

      When showing more than 25 threads in the help forum I found a similar posting, unresolved though as far as I can tell, att the bottom of the list. In that thread more info on the server and image sizes is requested so I provide that directly.

      Info on the server and php version can be found at www.lillahuset.nu/info.php and the images have the following sizes:

      Staffan_in_action.jpg - 389574 bytes
      jsm/JSM_10-dans.jpg - 96900 bytes
      jsm/JSM_10-dans_prispall.jpg -

       
    • Staffan Mossberg

      Getting a bit tired now I guess, so I hit the Post button a little early. Here is full info on the pictures:

      Staffan_in_action.jpg - size: 565 x 761 - filesize: 380 kB (389574 bytes)
      jsm/JSM_10-dans.jpg - size: 283 x 213 - filesize: 94.6 kB (96900 bytes)
      jsm/JSM_10-dans_prispall.jpg - size: 313 x 278 - filesize: 122.8 kB (125730 bytes)

      As before, any help is appreciated.

      /Staffan

       
    • Anonymous

      Anonymous - 2004-08-20

      Contact your sever administrator and ask them to make the following change in php.ini.

      memory_limit = 16M

      That should solve your problem. It solved mine when I had the same issue. Also, if after you try this you start getting blank white pages, you'll need to make your images smaller for GDlib to process, but I don't think you'll need to do that seeing as your images are so small. But just remember to keep them smaller than 2 Megs.

       
    • Staffan Mossberg

      Thanks for your help JohsuaTree. Unfortunately my server administrator refuses to increase the memory limit due to my site being hosted on a shared server and server memory being limited and so on.

      Anyway, since I really don't need the image resizing feature I had a look in the config/config.inc.php file and changed the available image sizes to only 640 and original. This solved the problem for the two images in the jsm folder, but now when I click on the thumbnail of the image in the gallery root folder nothing happens at first and then I get a window with an error message saying: "The document contains no data.". I don't know why this happens, but I think it's better than the previous error message.

      Now, the thing is that I'd be perfectly happy if the script just showed the picture in original size when I clicked a thumbnail. Does anyone know if you can configure the script to do that? Just disabling all image sizes in the config.inc.php file doesn't work. I've tried that already. 

      As before, I appreciate any help you can offer.

       
    • Martin Theimer

      Martin Theimer - 2004-08-31

      this is so strange...
      i've tried to reproduce the memory exhausted error, but i can't.
      i've created jpeg files with 4000x3000 ! pixel, (that would take up at least 4000 * 3000 * 3 = 36 000 000 bytes) and let my script resize them to 2000, 1024, etc... and everything worked just fine. no error.
      my memoy_limit = 8M (the default value)

      one difference i saw is, that i'm running a not-bundled GD library. (version: 2.0.15).
      (configured with "--with-gd[=DIR]" instead of "--with-gd")

      apache and php is compiled from source.
      php version is 4.3.4

      ---
      the "original"-size as default view-size (and the only one showing) will available in the next version.

       
    • Staffan Mossberg

      As the reason for this error on my server eludes us I'll just wait for the next version of the script.

      Many thanks for you efforts!

       
    • Nobody/Anonymous

      Waiting for the next version won't help.
      You will have to make your provider to change the memory limit.
      If you google for it, you will find a lot of other people with different applications who have the same problem
      The only next-version help could be a new version of the gd-library, which uses not so much memory.

      ab

       
    • Nobody/Anonymous

      > Now, the thing is that I'd be perfectly happy if
      > the script just showed the picture in original size
      > when I clicked a thumbnail. Does anyone know if
      > you can configure the script to do that? Just
      > disabling all image sizes in the config.inc.php file
      > doesn't work. I've tried that already.

      I would also like to know how to do this, if possible..  I also think the default mode should be to *not* resize the images at all, and allow me to configure phpAG to default to 640 or another size through the config.inc...

      Thanks!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.