Image wont process when over 3000px wide

See all posts Reply

Image wont process when over 3000px wide new!
by Craig, 15 years ago
Hi,

Im having an issue when trying to upload images over 3000 px wide. The image itself is only 2 megabytes and if under 3000px wide it uploads fine. When over 3000px wide the script just doesnt work and Im not sure if this is PHP issue or something within the script.

Thanks CraigReply
Re: Image wont process when over 3000px wide new!
by colin, 15 years ago
You are probably running out of memory.

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:
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
Re: Image wont process when over 3000px wide new!
by Craig, 15 years ago
Thanks for the quick response that worked. Its strange that i can upload many megabytes worth of images and it was fine but if just one of them was over a certain width the memory limit needed to be increased.

Anyway problem solved now so thanks again.Reply
Re: Image wont process when over 3000px wide new!
by Tim, 14 years, 8 months ago
I too have a memory error, however my memory is set to 64M, I have also tried your solution above to no avail (even tried setting it to 128M :O)

Fatal error: Out of memory (allocated 47185920) (tried to allocate 2764 bytes) in public_html/test/models/class.upload.php on line 2752

Thanks for the tip though.Reply
Re: Image wont process when over 3000px wide new!
by Alihan, 14 years, 7 months ago
Yes definitely Memory problem. Thank You Colin! I've set 64M and it's solved.Reply