Problem uploading photos which size is over 500 Kb

See all posts Reply

Problem uploading photos which size is over 500 Kb new!
by David, 16 years, 8 months ago
Hi, first of all congratulations for the upload Class, it is really useful and easy to use.

I am uploading photos in 4 file form fields. When I try to upload only one photo with size over 500 Kb the browser shows an error like 404 page not found, but if the photo is less than 500 kb all its ok.

I have configured php.ini with:

max_execution_time = 60
memory_limit = 40M
post_max_size = 8M
upload_max_filesize = 4M

Is there something I have missed??

Thank you very much!!Reply
Re: Problem uploading photos which size is over 500 Kb new!
by colin, 16 years, 8 months ago
You are probably running out of memory. What is important is not the size in KB, but the image dimensions, as the picture gets deflated into memory, and each pixel takes space.

See this post for more details.Reply
Re: Problem uploading photos which size is over 500 Kb new!
by David, 16 years, 8 months ago
Well, I have found the solution:

There is a file called php.conf in the folder /etc/httpd/conf.d

And into this file is a directive called

LimitRequestBody

Which value is by default 512 kb

I have set it with a value of 1500 kb.

Now I can upload files with this size or less.

Thanks!!Reply