class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Came across this error while testing the upload class.
"I was having a terrible time with the imagecreatefrompng function as it was working perfectly for one image and not at all for another. After many hours of frustration, I discovered that the problem was the image size (number of pixels). It appears that the maximum number of pixels this function will process is 1,040,000. So, be sure that the pixel resolution of the image (eg. 1040 x 1000) does not exceed this value."
The above was taken from php.net.
This causes an issue on line 2884 of the class.upload.php
my fix was to replace the line with additional size checks
You are in fact running out of memory. The fix you added is not good, because it relies on your memory setting, and will not be appropriate for other configurations.
"I was having a terrible time with the imagecreatefrompng function as it was working perfectly for one image and not at all for another. After many hours of frustration, I discovered that the problem was the image size (number of pixels). It appears that the maximum number of pixels this function will process is 1,040,000. So, be sure that the pixel resolution of the image (eg. 1040 x 1000) does not exceed this value."
The above was taken from php.net.
This causes an issue on line 2884 of the class.upload.php
my fix was to replace the line with additional size checks
While not perfect it does stop the problem of having the script exit without returning an error.
Regards,
Jared
On the same php.net page, read the second comment above the one you mentioned.
See this thread
Try to raise your local memory to 20M, 32M or more.
You can add this in your script:
Or in a .htaccess file: