php内存不够用,出现Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)
2012-09-23 00:08
976 查看
出现该错误的原因:是因为php页面消耗的最大内存默认是为 8M (在PHP的ini件里可以看到) ,如果文件太大 或图片太大 在读取的时候 会发生上述错误。
解决办法:1,修改 php.ini将memory_limit由 8M 改成 16M(或更大),重启apache服务
上面的方法试完之后就可以了。
2,在PHP 文件中 加入 ini_set(”memory_limit”,”100M”);注意:为了系统的其它资源的正常使用 请您不要将 memory_limit设置太大,其中-1为不限
3,修改.htaccess 文档(前提是该目录支持.htaccess)在文档中新增一句:php_value memory_limit 16M(或更大)
解决办法:1,修改 php.ini将memory_limit由 8M 改成 16M(或更大),重启apache服务
上面的方法试完之后就可以了。
2,在PHP 文件中 加入 ini_set(”memory_limit”,”100M”);注意:为了系统的其它资源的正常使用 请您不要将 memory_limit设置太大,其中-1为不限
3,修改.htaccess 文档(前提是该目录支持.htaccess)在文档中新增一句:php_value memory_limit 16M(或更大)
相关文章推荐
- php,Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)
- php项目编写过程中Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3214636 byt
- 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 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
- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 775920 bytes)
- php内存溢出,出现Allowed memory size of 8388608 bytes exhausted错误的解决办法
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php
- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 393216 byt
- PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 49 bytes)
- PHP错误——Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes)
- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 775920 bytes)
- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 775920 bytes)
- 修改 PHP 消耗内存的方法(Allowed memory size of 8388608 bytes exhausted解决方法)
- php内存溢出,出现Allowed memory size of 8388608 bytes exhausted错误的解决办法
- 执行php程序的时候,报错Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes)