Hi guys,
Nice place you have here. First poster.
I've got a problem with imagecreatefromjpeg() dying with an internal server error on images with fairly large dimensions (say 2000x1500). My resoures in php.ini are set fairly high and I've noticed that large dimensions make it fall over and not file sizes. Anyone have any clue as to what might be causing this or if it's indeed a known issue? I've narrowed down the problem in the script to the line containing imagecreatefromjpeg(), so I know it's the culprit.
I'm running PHP 4.3.10 (compiled with all the supporting GD stuff) on rh9.
Thanks for any pointers.
[SOLVED] imagecreatefromjpeg and large dimensions
Moderator: General Moderators
It is almost certainly doing one of two things. Either it's running into PHP's memory limit (http://uk.php.net/manual/en/ini.core.ph ... mory-limit), or the script is timing out (http://uk.php.net/manual/en/ref.info.ph ... ution-time). What settings do you have for these?
I've created images much large that that using GD2. It definitely can handle things that size.
I've created images much large that that using GD2. It definitely can handle things that size.
hmmm...I've max_execution_time and max_input_time at 120 and the memory limit at 64M. The picture's actually quite small (80KB), and the script gives the 500 error only a few seconds after I upload it, which makes me wonder if it's indeed a resource problem. Other pictures that are 1024x768 and over 1MB upload just fine.
Any other ideas? Thanks.
Any other ideas? Thanks.
What do you recieve if you prepend the following to your code?
Code: Select all
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);