[英]php.ini updates not reflected in phpinfo() output
I am trying to update memory_limit in php.ini, but I don't see the value updated in phpinfo().我正在尝试更新 php.ini 中的 memory_limit,但我没有看到 phpinfo() 中更新的值。 Here is the ini file path info from phpinfo():
这是来自 phpinfo() 的 ini 文件路径信息:
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Updated /etc/php.ini and then ran:更新 /etc/php.ini 然后运行:
systemctl restart httpd
I tried updating other values in ini file to see if anything gets updated, but nothing does.我尝试更新 ini 文件中的其他值以查看是否有任何更新,但没有任何更新。
I am on an AWS EC2 linux instance with wordpress.我在一个带有 wordpress 的 AWS EC2 linux 实例上。
Many modern PHP installations run PHP-FPM by default, instead of as an Apache module mod_php.许多现代 PHP 安装默认运行PHP-FPM ,而不是作为 Apache 模块 mod_php。 PHP-FPM is itself a separate service that needs to be restarted via your operating system's preferred method.
PHP-FPM 本身是一个单独的服务,需要通过操作系统的首选方法重新启动。 eg
例如
$ sudo systemctl restart php-fpm
You mentioned you already knew which php.ini to modify from the phpinfo()
output.您提到您已经知道要从
phpinfo()
output 修改哪个 php.ini。 For future readers, the PHP-FPM service may use a different php.ini.对于未来的读者,PHP-FPM 服务可能会使用不同的 php.ini。 Consult the output from
phpinfo()
when loaded via the web to find out which php.ini to modify.通过 web 加载时,从
phpinfo()
查询 output 以找出要修改的 php.ini。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.