Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
2015-02-16 14:31
651 查看
解释是可用内存已耗尽,这关系到PHP的memory_limit的设置问题。
我在网上看到,有两种方法解决
1、修改php.ini
memory_limit = 128
这种方法需要重启服务器,很显然,此方法对虚拟机有限制。
2、通过ini_set函数修改配置选项值
ini_set ('memory_limit', '128M')
但是我用完两种方法后都没有成功。
虽然看了一些资料上面说PHP5中,对于memory_limit的设定为128M的上限,但是我还是尝试了一下去分配更多的内存,将memory_limit设置为256M,OK,成功了!
我在网上看到,有两种方法解决
1、修改php.ini
memory_limit = 128
这种方法需要重启服务器,很显然,此方法对虚拟机有限制。
2、通过ini_set函数修改配置选项值
ini_set ('memory_limit', '128M')
但是我用完两种方法后都没有成功。
虽然看了一些资料上面说PHP5中,对于memory_limit的设定为128M的上限,但是我还是尝试了一下去分配更多的内存,将memory_limit设置为256M,OK,成功了!
相关文章推荐
- 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
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in
- 问题解决Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 38218371 bytes)
- PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 49 bytes)
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)错误的解决
- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 775920 bytes)
- 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 2611816 bytes)
- discuz Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 262144 bytes) 错误解决方法
- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 775920 bytes)
- 执行php程序的时候,报错Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes)
- PHP错误——Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes)
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php