I'm trying to let user upload up to 30MB max but the server hangs not even produce an error. Not even error in browser network bar in inspection. I did changes below after reading whole lot of info on Internet but no luck so far. Anyone knows what else I can do?
Thanks in advance
.htaccess:
<IfModule mod_php5.c>
php_value post_max_size 40M
php_value upload_max_filesize 350M
php_value max_execution_time 1200
php_value max_input_time 1200
</IfModule>
/etc/php5/{cli,fpm}/php.ini
post_max_size 40M
upload_max_filesize 35M
max_execution_time 1200
max_input_time 1200
RESTART:
sudo service php5-fpm restart
sudo service apache2 restart
对于可能会遇到此问题的其他人,可能还会有Apache的ModSecurity设置SecRequestBodyLimit
(在使用Apache的情况下),并且在系统日志中会出现以下错误:
ModSecurity: Request body (Content-Length) is larger than the configured limit (10485760)
One thing to check is the maximum post size set in the PHP Suhosin security patch. This complements the settings in your php.ini and might cause the issues that you're seeing. A similar question here: https://serverfault.com/questions/486134/php-cant-increase-maximum-upload-limit
Let me know if it worked.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.