Reputation: 487
I try to upload file of 300 MB. but not uploaded and now display any error. variables value in php.ini file is
post_max_size 800M
upload_max_filesize 750M
memory_limit 2048M
max_execution_time 17100
max_input_time 17100
if i try to print tmp name of file by echo $_FILES['data-file']['tmp_name']; die; Nothing display page redirecto to home. but for less then 128M it show /tmp/phpShle like that.
Upvotes: 0
Views: 611
Reputation: 487
My proble is solved. I need to set these variable on modsec2.user.conf file
SecRequestBodyLimit 1073741824
SecRequestBodyNoFilesLimit 1073741824
This is a apache server file. and error was shown on Apache error log.
Upvotes: 0
Reputation: 529
Please write this on .htaccess.
<IfModule mod_php5.c>
php_value post_max_size 256M
php_value upload_max_filesize 256M
php_value memory_limit 500M
</IfModule>
This might help you. Cheers :)
Upvotes: 0
Reputation: 2594
If you are on LAMP make sure you are editing right php.ini
file. In LAMP you will find cli related php.ini
and php-apache related php.ini
. To make above scenarios of file upload possible, you will need to edit php-apache php.ini file which is in /etc/php5/apache2/
and also restart apache service.
If you are on WAMP, it has only one php.ini
and WAMP is automatically restarting services after editing file. So it should work.
-Or-
You can write a .htaccess file in web home directory.
RewriteEngine on
php_value post_max_size 300M
php_value upload_max_filesize 300M
Upvotes: 0