Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes)(致命错误:允许的内存大小为 134217728 字节已用尽(尝试分配 87 字节))
问题描述
当我登录到我的 Web 应用程序时,它显示如下错误:
When I login to my web application it shows an error like:
致命错误:/gt/2.ps.fo/home/hft/domains/console.fo.spalgo.com/public_html/cake/libs/中允许的内存大小为 134217728 字节(试图分配 87 字节)模型/数据源/dbo/dbo_mysql.php 在线 775
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes) in /gt/2.ps.fo/home/hft/domains/console.fo.spalgo.com/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 775
有没有办法解决这个问题?为什么会出现此错误?
Is there any solution to solve this problem? Why do I get this error?
推荐答案
听起来你已经分配了 比 PHP 允许的内存多.如链接页面所述,编辑站点 php.ini
配置中的 memory_limit
设置.
That sounds like you've allocated more memory than PHP will allow. Edit the memory_limit
setting in your site php.ini
configuration as described on the linked page.
另一种可能性(不太可能)是您已达到用户或组的 setrlimit(2)
资源限制.检查 /etc/security/limits.conf
以了解可能为您的 Web 服务器设置的限制,以及启动您的服务器环境和 PHP 解释器环境的任何初始化脚本.
Another possibility (less likely) is that you've hit the setrlimit(2)
resource limits for your user or group. Check /etc/security/limits.conf
for limits that might be set for your web server, along with whatever initialization scripts start your server environment and PHP interpreter environment.
这篇关于致命错误:允许的内存大小为 134217728 字节已用尽(尝试分配 87 字节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:致命错误:允许的内存大小为 134217728 字节已用尽


- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01