faqts : Computers : Programming : Languages : PHP : Common Problems : File Uploading

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

60 of 94 people (64%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Why when I try to upload a very large file (> 10M) things does not work, even if I've configured PHP.ini for accept larger files?

Apr 3rd, 2007 12:25
Devon Weller, Stefan Papp, Guest, http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody


Hi, 
I saw that a lot of people do have problems with uploading larger 
files. Mostly, they have checked the php.ini file and set all 
parameters regarding downloads very high. It still did not work...
Here is the solution, how it might work.
1. Check your apache error log file
If there is an entry like "Requested content-length of 19883694 is 
larger than the configured limit of 524288", you will notice that is 
not a php problem but an apache problem
2. There is a file called php.conf in your apache configuration dir. 
There you can set the upload limit for php scripts
regards 
Stefan
Also check your http.conf file (/etc/httpd/conf/httpd.conf).  Look for a
LimitRequestBody configuration setting.  If this is configured to
8192000, for instance, then apache will not allow any uploads greater
than 8 MB.  This can happen regardless of what the php.ini settings are.
- Devon