php.ini中的memory_limit设置没有apache的影响
我从Laravel应用程序中遇到了“允许记忆尺寸为134217728字节”的错误。但是,在将Monemen_Limit从1.28m更改为51.2m之后,我仍然遇到相同的错误(不用说我在更改后重新启动Apache:重新启动,停止/启动等,并验证了Apache确实重新启动了)。
我在网页中使用phpinfo()检查了,它表明Memory_limit仍然为1.28m,而INI文件(/etc/php.ini)是我更改的文件。但是,当我运行命令 php -r'phpinfo();'从命令行中,Memory_limit为512m。我在/etc/php.d和所有Apache配置文件中检查了其他INI文件,并且没有一个设置PHP的Memory_limit。
我的服务器以Apache 2.4.37和PHP 7.2.24运行RedHat 8。有人有任何想法会发生什么?谢谢。
I got an error of "allowed memory size of 134217728 bytes exhausted" from a laravel app. But I still got the same error after I changed memory_limit from 128M to 512M (needless to say that I restarted apache after the change: restart, stop/start, etc. and verified that apache did get restarted).
I checked with phpinfo() in a web page and it showed that the memory_limit is still 128M and the ini file (/etc/php.ini) is the file I changed. But when I ran the command php -r 'phpinfo();' from the command line, the memory_limit is 512M. I checked other ini files in /etc/php.d and all apache config files and none of them set memory_limit for php.
My server runs redhat 8 with apache 2.4.37 and php 7.2.24. Anyone have any ideas what might be going on? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论