Image upload and resize problems

November 28, 2007

Came across a problem in an application where 6 large photos were being uploaded and resized simultaneously. I suspected it was a memory problem, as it’s been working fine for a long time. I increased  upload_max_filesize in php.ini, which half-worked – I could now upload 2 large images, but not 6 like I needed to. Turned out I needed to increased post_max_size too (again in php.ini).

Note that if upload_max_filesize is exceeded then [‘tmp_name’] fields in $_FILES will be blank.

One other thing worth mentioning that I came across when working on the same application a while ago is I found I also had to increase memory_limit (in php.ini) way beyond its default to allow php enough memory to resize big image files.


One Response to “Image upload and resize problems”

  1. Daddyroy Says:

    Try increasing the memory size in your php.ini fil to 64MB it worked for me…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: