PDA

View Full Version : File uploads with PHP


steve
30th May 2005, 20:37
I've written a PHP script for uploading files to a server. It's working fine except for large files. The limit seems to be 2 MB. Whenever a file is larger the upload fails. Is there some kind of setting I have to change?

Steve

roland
1st June 2005, 21:23
Have a look at your php.ini and change the line

upload_max_filesize = 2M

to a larger value (e.g. 10M for 10 MB) and restart your Apache afterwards.

Roland

Lord_Garfield
12th October 2005, 10:17
Hi,

it is true that you can change it in php.ini but still I don't recomand it becouse if you let people upload 10MB they will have to wait a long time. + you will probably also need to change your script time out stuff in php.ini. Don't know exactly what and where but I know you need to change something else to.
Something that defines how long a script can run. else you get a time exceeded error.

denebstar
26th September 2008, 15:42
I am interrested to know the conclusion because I have set very large values on my server, I want to be able to upload/download files up to 100M and when I try to so so from the server itself it works (I tried up to 41Mo) but as soon as I tried from another location it fails for files as small as 1M !!

with the following error :


Network Error (tcp_error)


A communication error occurred: ""
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

For assistance, contact your network support team.

falko
27th September 2008, 14:28
Any errors in your logs?