Page 1 of 1

GD Library Max File Size Limits

Posted: Sat Mar 01, 2008 11:59 am
by curseofthe8ball
We have an instance where a client uploaded three large photos and the GD Library scripts are returning a red x for each of them while other, smaller, photos are performing as expected.

When we attempt to view the large photos via the GD script, we get a blank page however when we add the ini_set('display_errors', True); code, we see a little more about the problem with this error:

Notice: Undefined index: action in /vservers/12345ru/htdocs/resize_imageLT.php on line 5

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 12288 bytes) in /vservers/12345ru/htdocs/resize_imageLT.php on line 93

The image sizes in questions are:

w: 3072
h: 2040
filesize: 1.6mb

The idea behind the application we are developing is that the client needs a photo gallery where they can upload photos and have the photos appear as thumbnails but when clicked would display the full photo so the user can download it in a larger version, most cases the original high-res version, to use for printing purposes.

For examples of the problem:

The large image:
http://www.thelincolntable.org/site/ima ... 2X6912.jpg

The large image via the GD Library:
http://76.12.67.113/resize_imageLT.php? ... 12&ext=jpg

Another smaller image via the GD Library that works properly:
http://www.thelincolntable.org/site/ima ... _Malta.jpg

http://76.12.67.113/resize_imageLT.php? ... ta&ext=jpg

We contacted our hosting provider to see if they would increase the memory_limits in PHP however they will not increase it from 16MB. Anyone know of any workarounds to get this to work with high-res, large file size, photos?

Re: GD Library Max File Size Limits

Posted: Sun Mar 02, 2008 3:55 pm
by curseofthe8ball
Anyone got any ideas? Is this even possible without raising the memory_limits setting?

Re: GD Library Max File Size Limits

Posted: Tue Mar 04, 2008 12:20 am
by curseofthe8ball
Noone else has run into this problem?

Re: GD Library Max File Size Limits

Posted: Tue Mar 04, 2008 1:10 am
by Benjamin
You'll need to get the host to increase the memory or switch hosts.