Uploading HUGE files from a web browser???
Moderator: General Moderators
Uploading HUGE files from a web browser???
I know how to upload files from a web browser but when I upload really large file(In MB)? It seems to timeout or something... Can anyone help?
I actually found that increasing the timeout value didn't make any difference. I don't believe that the php script starts running until after the file has been Completely uploaded (apache handles it). That's what my tests lead me to believe though, anyone know more of what's going on behind the scenes? We have a server running with a timeout of 30 seconds, but we can upload files that are several hundred megabytes.
I may have forgotten something, but here's what I remember changing:
(These files are where they are located in redhat running apache, I assume other platforms have similar files)
1. /etc/php.ini has a line "upload_max_filesize = 2M". Change it to whatever size you want.
2. /etc/httpd/conf.d/php.conf has a line "LimitRequestBody 524288". Since the file is sent to the browser as part of the request body, you need to change this value. Note that this is in bytes (1024 bytes to the kilobyte, 1024 kilobytes to the megabyte, etc). So if you want a 8 megabyte limit, you need to set this to 8 * 1024 * 1024 or 8388608. I'm not sure why this defaults to 512k since the php.ini max size defaults to 2M.
Anyway, I had much better success changing those values than I did with the timeout. Try them out.
I may have forgotten something, but here's what I remember changing:
(These files are where they are located in redhat running apache, I assume other platforms have similar files)
1. /etc/php.ini has a line "upload_max_filesize = 2M". Change it to whatever size you want.
2. /etc/httpd/conf.d/php.conf has a line "LimitRequestBody 524288". Since the file is sent to the browser as part of the request body, you need to change this value. Note that this is in bytes (1024 bytes to the kilobyte, 1024 kilobytes to the megabyte, etc). So if you want a 8 megabyte limit, you need to set this to 8 * 1024 * 1024 or 8388608. I'm not sure why this defaults to 512k since the php.ini max size defaults to 2M.
Anyway, I had much better success changing those values than I did with the timeout. Try them out.