我试图增加post_max_size为1024MB,我使用ini_get('post_max_size')和phpinfo()检查设置和post_max_size显示为128M在两个。
服务器上的一些phpinfo():
PHP Version 5.5.9-1ubuntu4.7 System Linux Dalaran 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 Build Date Mar 16 2015 20:43:56 Server API Apache 2.0 Handler Configuration File (php.ini) Path /etc/php5/apache2 Loaded Configuration File /etc/php5/apache2/php.ini Scan this dir for additional .ini files /etc/php5/apache2/conf.d Apache Version Apache/2.4.7 (Ubuntu) user_dir no value
/etc/php5/apache2/php.ini
669 ; Maximum size of POST data that PHP will accept. 670 ; Its value may be 0 to disable the limit. It is ignored if POST data reading 671 ; is disabled through enable_post_data_reading. 672 ; http://php.net/post-max-size 673 post_max_size = 1024M
每次更改后我都重新启动了apache。 我也在/ etc / php5中的所有目录上运行了grep,并且没有发现Post_max_size的其他参考
更改upload_max_filesize和memory_limit工作正常。
没有设置user_dir,所以它不应该加载任何.user.ini文件。
没有什么有用的Apache错误日志。
如果您对我可以检查的内容有任何想法,请告诉我。
是! 根据Zoredache说的我做了一个
:/etc/apache2$ rgrep post *
发现
sites-available/000-default.conf: php_value post_max_size 128M
这么一点
/etc/apache2/sites-available$ sudo vi 000-default.conf
更改php_value post_max_size 128M到1024M,我完成了!