upload_max_filesize 未反映在 phpinfo() 中
在我的 php.ini 文件(系统上只有一个)中,我
post_max_size = 8M
upload_max_filesize = 8M
upload_max_size = 8M
最初将它们设置为 2M。我将它们更改为8M,重新启动apache,甚至重新启动实例。但是当我对其执行 phpinfo() 时,它仍然显示 2M。
我很确定我有正确的 php.ini 文件,因为如果我增加 max_execution_time 它会反映在 phpinfo() 中,但我为 upload_max_filesize 和 post_max_size 输入的任何内容都不会反映在 phpinfo() 中,即使我仔细检查 php.ini设置就在那里。
这是一个 AWS Linux 实例。 PHP5.2.16 apache 2.2.17(EL)
大师有什么想法吗?
In my php.ini file (there is only one on the system) I have
post_max_size = 8M
upload_max_filesize = 8M
upload_max_size = 8M
Originally they were set to 2M. I changed them to 8M restarted apache, even restarted instance. But when I do a phpinfo() on it, it still shows 2M.
I am pretty sure I have the right php.ini file because if I increase the max_execution_time it is reflected in the phpinfo() but anything I put in for upload_max_filesize and post_max_size is not reflected in phpinfo() even though I double check php.ini and the settings are there.
This is a AWS Linux instance.
php5.2.16
apache 2.2.17(EL)
Any thoughts from the guru’s out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Apache 的
.htaccess
文件中是否有覆盖选项的条目?它们看起来像这样:
这是 Apache 的
.htaccess
文档: http://httpd.apache.org/docs/1.3/howto/htaccess.htmlDo you have entries in Apache's
.htaccess
file that are overwriting the options?They would look something like:
Here's Apache's
.htaccess
documentation: http://httpd.apache.org/docs/1.3/howto/htaccess.html如果您在本地服务器(例如 wamp 或 xampp)中运行,请确保它使用您认为的 php.ini。这些服务器通常默认使用不在您的 html 文档文件夹中的 php.ini。
If you are running in a local server, such as wamp or xampp, make sure it's using the php.ini you think it is. These servers usually default to a php.ini that's not in your html docs folder.
请检查您的 php.ini 文件是否有任何错误。 php.ini 采用错误行后的所有默认值。
我遇到了同样的问题,在从 php.ini 中删除错误后修复了。
希望这有帮助。
Please check if your php.ini file don't have any errors. php.ini takes all default values after error line.
I was having same issue, I fixed after removing errors from php.ini.
Hope this help.