php upload_max_filesize ignored - unable to upload 5gb file
5,913
This PHP-Change log
http://php.net/ChangeLog-5.php#5.6.0
states that, until PHP 5.6.0, file uploads were limited to 2 GB.
Related videos on Youtube
Comments
-
a coder over 1 year
I'm unable to upload files larger than roughly 2gb. The max upload/post values were previously set to 2500MB so I thought that was the problem.
First,
# php --version PHP 5.3.3 (cli)
I set
upload_max_filesize
andpost_max_size
as follows# vi /etc/php.ini post_max_size = 5500M upload_max_filesize = 5500M [write/quit vi]
Next,
# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
I then confirmed the new configuration with a phpinfo() script:
post_max_size 5500M 5500M upload_max_filesize 5500M 5500M
I go back to my script to upload another large data file (~4GB), and am again told that the uploaded file exceeds value of
upload_max_filesize
.So, I am at a loss. I am able to upload 2gb and smaller files no problem. I've restarted Apache, and don't know where to go from here.
-
Michael Hampton over 9 yearsExactly what operating system, distribution, etc.?
-
a coder over 9 yearsCentOS 6.5, Apache 2.2
-
a coder over 9 yearsIt does and the file size limit matches what is in php.ini. The software (VIMP) is known to work just fine with very large files ( >5gb )
-
-
Zoredache over 9 yearsTesting with
php -i
may still give him the wrong file. It isn't uncommon to have a completely different config for the CLI vs the Apache module, or CGI. -
a coder over 9 yearsI'm updating the correct file because if I change
upload_max_filesize
to 9999M, then restart apache, I see that reflected inphpinfo();
-
a coder over 9 years64 bit CentOS with 24gb RAM. Wondering if I have a 32-bit version of Apache installed now. How would I find that out?
-
a coder over 9 years
$ file /usr/sbin/httpd
/usr/sbin/httpd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped -
skarap over 9 yearsis there an error message in error_log?
-
a coder over 9 yearsooo till Monday, can't get to my video production machine. will follow up then (and delete this message at that time)