PHP错误——Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes)
2015-03-26 23:58
1136 查看
解释是可用内存已耗尽,这关系到PHP的memory_limit的设置问题。
这里有两种方法解决
1、修改php.ini
memory_limit = 128
打开终端输入下列bash命令
利用/memory_limit 匹配查找到字符串
这种方法需要重启服务器,很显然,此方法对虚拟机有限制。
2、通过ini_set函数修改配置选项值
这里有两种方法解决
1、修改php.ini
memory_limit = 128
打开终端输入下列bash命令
cd /private/etc sudo cp php.ini.default php.ini sudo vi php.ini
利用/memory_limit 匹配查找到字符串
这种方法需要重启服务器,很显然,此方法对虚拟机有限制。
2、通过ini_set函数修改配置选项值
ini_set ('memory_limit', '128M') ini_set ('memory_limit', '128M')
相关文章推荐
- 执行php程序的时候,报错Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes)
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)错误的解决
- Fatal error: Allowed php错误提示memory size of 8388608 bytes exhausted (tried to allocate 58368 bytes) i
- PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- (转载)PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 49 bytes)
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)
- 问题解决Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 38218371 bytes)
- PHP错误:Allowed memory size of 134217728 bytes exhausted
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes) 今天要
- discuz Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 262144 bytes) 错误解决方法
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in
- php项目编写过程中Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3214636 byt