开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜