Centos – php upload_max_filesize ignored – unable to upload 5gb file

apache-2.2centosPHPupload

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 and post_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.

Best Answer

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 Topic