开发者

PHP ini_get() and php.ini are not in sync

开发者 https://www.devze.com 2023-01-08 17:02 出处:网络
My php.ini has a memory_limit of 256M. phpinfo() reflects this开发者_运维技巧. But from within PHP, ini_get(\'memory_limit\'); returns 32M. My fatal errors for exceeding memory limit also say that the

My php.ini has a memory_limit of 256M. phpinfo() reflects this开发者_运维技巧. But from within PHP, ini_get('memory_limit'); returns 32M. My fatal errors for exceeding memory limit also say that the max is 32M.

Any ideas why phpinfo() is lying to me?


are one of the results from cli, and the other from web?


It's possible to override php.ini parameters in the Apache configuration files.

Depending on the system, their location may vary, but check anything under /etc/apache2, /etc/apache2/conf.d, /etc/apache2/sites-enabled


have you tried setting the limit with PHP code as a test?

ini_set('memory_limit', '256M');

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号