提示Allowed memory size of 134217728 bytes exhausted,出现这种错误的情况常见的有三种:

0:查询的数据量大。

1:数据量不大,但是php.ini配置的内存太小。

2:逻辑出现死循环。

解析:

134217728/1024/1024 = 128M

解决方案:

0:修改php.ini

memory_limit = 128

但是这种需要重启服务器,所以对于虚拟机有限制

1:通过ini_set函数修改配置选项值

// 升级256M、128M内存
ini_set('memory_limit','256M')
ini_set('memory_limit','128M')
// 不做限制
ini_set('memory_limit','-1')

  

php的Allowed memory size of 134217728 bytes exhausted问题的更多相关文章

  1. (转载)PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in

    (转载)http://blog.csdn.net/beyondlpf/article/details/7794028 Fatal error: Allowed memory size of 13421 ...

  2. Allowed memory size of 134217728 bytes exhausted

    错误信息: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65015808 bytes) 由于报错信息和数据库 ...

  3. Allowed memory size of 134217728 bytes exhausted解决办法(php内存耗尽报错)【简记】

    报错: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) i ...

  4. php的Allowed memory size of 134217728 bytes exhausted问题解决办法

    php的Allowed memory size of 134217728 bytes exhausted问题解决办法 报错: Fatal error: Allowed memory size of 1 ...

  5. 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 1099 bytes) in   Fa ...

  6. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)

    一段PHP程序执行报错: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261181 ...

  7. Allowed memory size of 134217728 bytes exhausted (tried to allocate 2 bytes)

    出现  Allowed memory size of 134217728 bytes exhausted (tried to allocate 2 bytes)时在php.ini文件中配置 memor ...

  8. Allowed memory size of 134217728 bytes exhausted问题解决方法

    Allowed memory size of 134217728 bytes exhausted问题解决方法 php默认内存限制是128M,所以需要修改php.ini文件. 查找到memory_lim ...

  9. PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted 错误

    php运行一段时间后,部分页面打不开,查看nginx日志里面一直在报PHP message: PHP Fatal error:  Allowed memory size of 134217728 by ...

随机推荐

  1. 第三方统计分析埋点工具对比,神策、Ptmind、GrowingIO、国双,还有谷歌分析,谁更好?

    第三方统计分析埋点工具对比,神策.Ptmind.GrowingIO.国双,还有谷歌分析,谁更好?https://www.colabug.com/2985393.html GA.Mixpanel 和神策 ...

  2. Always an integer UVALive - 4119

    题目很简单,就是求表达式(P/D)的结果是不是整数.其中P是一个整系数的多项式,D是一个正整数. 把1-k(最高次)+1都试一次就好了.结论可以总结归纳得到.(k取 0, 1, 2 .... 的情况推 ...

  3. css技巧-案例

    点击进入:http://herry.wuhairui.cn/cssSkill/main.html

  4. Oracle之表的相关操作

    #添加字段 格式: alter table table_name add column_name datatype; 例子: alter table userinfo ); desc userinfo ...

  5. spring总结之一(spring开发步骤、bean对象的管理、bean生命周期)

    ###spring 1.概念:开源,轻量级,简化开发的企业级框架. 开源:免费,发展快. 轻量级:占内存小. 简化开发:通用的功能封装,提高程序员的开发效率.--------------------- ...

  6. 探索RequestBody报com.alibaba.fastjson.JSONObject cannot be cast to xxx

    今天使用RequestBody接受前端传过来的参数,以前接受字符串数组非常成功,这次把形参改成了List<User>,原本以为顺利接受参数并映射成User的list结构,结果竟然在我取us ...

  7. 最菜的小鸟(mkdir -pv)

    命令 mkdir -pv /usr/local/modules/{openjdk,nginx,tomcat,mariadb}/{manifests,files,templates,lib,tests, ...

  8. python简说(一)if,for等

    一.python简说 python可以用于自动化测试.web开发.数据分析.AI python.自动化运维,第三方模块最多的一个语言. 编译型语言 c.c++ 要运行,先要编译,编译成二进制的. 解释 ...

  9. Linux上的oracle巡检脚本

    修改自大神博客:http://www.cnblogs.com/jyzhao/p/5364049.html 脚本巡检的优化:自动化,节省时间. 脚本需加强:巡检结果中有大量的sqlplus连接信息,后期 ...

  10. bzoj 4044 Virus synthesis - 回文自动机 - 动态规划

    题目传送门 需要高级权限的传送门 题目大意 要求用两种操作拼出一个长度为$n$的只包含'A','T','G','C'的字符串 在当前字符串头或字符串结尾添加一个字符 将当前字符串复制,将复制的串翻转, ...