首页 > 网络相关 > 修改php的memory限制

修改php的memory限制

2008年8月28日 00:02 Slyar 发表评论 阅读评论

文章作者:Slyar 文章来源:Slyar Home (www.slyar.com) 转载请注明,谢谢合作。

Xampp搭环境,用xml导入的时候出了点问题,可能很多人也有这样的问题吧,以前我没碰到,今天遇到了。。。

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 334230 bytes) in D:xampphtdocstest.php on line56

php内存溢出了,无语。来吧,我们修改一下。

1、打开 xamppapachebinphp.ini 。不要去php文件夹找那个php5.ini ,那个不是配置文件。

2、搜索 "memory" 找到以下内容:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 60     ; Maximum execution time of each script, in seconds
max_input_time = 60    ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M      ; Maximum amount of memory a script may consume (16MB)

3、修改 "memory_limit =" 的值即可,一般改成64M就差不多了。

4、重启Apache ,完毕。

分类: 网络相关 标签: ,
  1. 2008年8月28日21:36 | #1

    还没遇到这种情况,不过以后出现了就知道怎么弄了

bnuep:0801010047