php.ini中的memory_limit设置没有apache的影响

发布于 2025-02-13 11:17:10 字数 420 浏览 0 评论 0原文

我从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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文