...
Excerpt |
---|
To upload a large sized file more than 2G in PHP, the OS must be based in 64bits instead of 32bits, and you should change some settings in /etc/php.initini and LimitRequestBody=0 in httpd.conf or virtualhost |
In the /etc/php.ini, you should change some values like
Code Block |
---|
post_max_size = 0
upload_max_filesize = 0
max_input_time = 3600
max_execution_time = 3600 |
Note that 3600 is for user to have 60mins time when uploading files to server. Its default timeout value is 30 secs in PHP that is why uploading fails every time - meaning uploading fails by that timeout limit, so you will need to change its value like above example.
And one more a action you should do is adding LimitRequestBody 0 to your httpd.conf. In my case, I just added to vhost like below:
Code Block |
---|
<VirtualHost *:80> ServerName partner.net DocumentRoot "/www/production/partner.net/" LimitRequestBody 0 </VirtualHost> |
Or you can simply put below values at .htaccess that located on the root of the PHP-based web site.
Code Block |
---|
php_value post_max_size 0
php_value upload_max_filesize 0
php_value max_file_uploads 100
php_value max_input_time 3600
php_value max_execution_time 3600
LimitRequestBody 0 |