首页 / PHP / PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744
PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1772字,纯文字阅读大概需要3分钟。
内容图文
原文 PHP运行错最有效解决办法Fatal error: Out of memory (allocated 6029312)
Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744
疑问:786432 是指786432bytes?即:768MB 98304 bytes=96MB 那0.75M是怎么算出来的。
正确答案:786432bytes=768KB=0.75MB 98304bytes=96KB=0.09MB ?
最小是位 <其次字节(byte)<KB<MB<GB<TB
一个字节 =8位
1KB=1024B(字节)
1MB=1024KB
1GB=1024MB
1TB=1024GB
千,1KB=2的10次方=1024B,
兆,1MB=2的20次方=1024*1024B=1024KB,
吉,1GB=2的30次方=1024*1024*1024B=1024MB,
太,1TB=2的40次方=1024*1024*1024*1024B=1024GB,
拍,1PB=2的50次方=1024*1024*1024*1024*1024B=1024TB,
艾,1EB=2的60次方=1024*1024*1024*1024*1024*1024B=1024PB,
泽,1ZB=2的70次方=1024*1024*1024*1024*1024*1024*1024B=1024EB,
尧,1YB=2的80次方=1024*1024*1024*1024*1024*1024*1024*1024B=1024ZB.
今天一个客户的网站出现这样的错误。程序是PHP的。经百度了一下。说明内存不足。中文件翻译的意思是:内存不足(分配786432)(尝试分配98304字节)
意思是尝试分配98MB的内存。但一般php设置为只允许给php程序分配 0.75M内存
解决办法:打开php.ini 修改memory_limit = 的这行
依照服务器配置进行调整
配置的内存使用大小修改后重启iis/apache
问题解决^^
PHP5.2.3-win32这个版本有个非常严重的bug,那就是最大内存设置成1024M,但是PHP实际返回的只有2M,经常返回下面的错误:
PHP Fatal error: Out of memory (allocated 1048576) (tried to allocate 393216 bytes)
PHP Fatal error: Out of memory (allocated 1048576) (tried to allocate 393216 bytes)
PHP Fatal error: Out of memory (allocated 1048576) (tried to allocate 393216 bytes)
PHP Fatal error: Out of memory (allocated 1048576) (tried to allocate 393216 bytes)
PHP Fatal error: Out of memory (allocated 786432) (tried to allocate 393216 bytes)
PHP Fatal error: Out of memory (allocated 1310720) (tried to allocate 393216 bytes)
这是官方的bug报告,该bug只出现于windows版本,linux版本没有这个bug。
原文:http://www.cnblogs.com/lonelyxmas/p/5880181.html
内容总结
以上是互联网集市为您收集整理的PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744全部内容,希望文章能够帮你解决PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。