Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » ImageGallery: GD.php out of memory

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1955 Views
  • AdamJ
    Avatar
    Community Member
    145 Posts

    ImageGallery: GD.php out of memory Link to this post

    Hey guys,

    I have had the DataObjectManager and ImageGallery installed on a website with absolutely no issues, runs amazingly. However it seems to have reached an invisible ceiling and wont take anymore images in a folder. The folder in question has 103 images, and image number 104 tips it over the edge and gives me this error message:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2560 bytes) in /home/horrigan/public_html/sapphire/filesystem/GD.php on line 24

    I get the above error message on both the gallery page for that folder, and in the backend on the photos tab for that folder. I have increased the memory limit of php to 128M and this is confirmed in the phpinfo();.

    Any ideas what could be at play here?

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery: GD.php out of memory Link to this post

    I've only seen this happen when I upload a really large image. Resampling an image requires that the image data be stored in memory while it creates a new file, so the larger the input, the more memory it requires. The memory allocation is not additive, however. AFAIK, it is freed after each process, so the number of images in the gallery shouldn't matter.

    So, are you uploading a large image? When does the error occur? After the upload or on the gallery page?

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: ImageGallery: GD.php out of memory Link to this post

    Ah sorry man, I checked everything except the obvious. I was busy with some other stuff yesterday and just took the easy route and posted here. Thanks for the quick response, it was just a large image it seems.

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: ImageGallery: GD.php out of memory Link to this post

    Its wierd. I can upload a 1.5mb image, but my sister can't upload an image she has, and on trying the image myself, i can't do it either. Must be something with her image...

  • banal
    Avatar
    Community Member
    901 Posts

    Re: ImageGallery: GD.php out of memory Link to this post

    What kind of image is it and how/when does the upload fail? Several things could cause problems:
    - unusual characters in the filename
    - unrecognized file format (eg. bmp?)
    - CMYK instead of RGB colorspace
    - Image with different color-depth (more than the usual 8bit per channel)

    1955 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.