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.
I've used your excellent script for a while but now got some problems.
When I try to resize pictures with high resolution it always fails. I get no errors. The page just quit loading at the place where I have my script. Similar to a "DIE("");) in other words.
I haven't changed anything on my pages, and it has worked before. My guess is the server has changed some settings. MaxMemory? MaxTime? Or what do you think?
You need to raise the PHP memory limit, usually in php.ini. On shared hosting, you probably can't edit your php.ini, so you can try the following, although it will work only if the hosting company allows it, which they usually don't.
You can add this in your script:
ini_set ( "memory_limit", "40M")
Or in a .htaccess file:
php_value memory_limit 40M
If the above doesn't work, ask your hosting company.Reply
I've had the same problem for a while and have tried to up my memory limit, but i don't think I can do so with my hosting package.
Anyway, the funny thing is that the script will resize an images that is a 5mb JPG (with lots of detail) but wont resize a 1.89mb JPG (with lots of detail)...weird!
It has me totally confused!
I can post a link to both of these images if needed.Reply
I've used your excellent script for a while but now got some problems.
When I try to resize pictures with high resolution it always fails.
I get no errors. The page just quit loading at the place where I have my script. Similar to a "DIE("");) in other words.
I haven't changed anything on my pages, and it has worked before. My guess is the server has changed some settings. MaxMemory? MaxTime? Or what do you think?
Thanks again for a lovely script btw :)
BR
Martin jonasson
Search for memory in the site, or click here.
You can also check this post.
You need to raise the PHP memory limit, usually in php.ini. On shared hosting, you probably can't edit your php.ini, so you can try the following, although it will work only if the hosting company allows it, which they usually don't.
You can add this in your script:
Or in a .htaccess file:
If the above doesn't work, ask your hosting company.
I've had the same problem for a while and have tried to up my memory limit, but i don't think I can do so with my hosting package.
Anyway, the funny thing is that the script will resize an images that is a 5mb JPG (with lots of detail) but wont resize a 1.89mb JPG (with lots of detail)...weird!
It has me totally confused!
I can post a link to both of these images if needed.
Yes, please post links to the images.