网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   建站交流 (https://www.0058.net/forumdisplay.php?f=11)
-   -   修改php的memory限制 (https://www.0058.net/showthread.php?t=3543)

yahoo 2009-01-17 11:57 AM

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

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

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

1、打开 \xampp\apache\bin\php.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 ,完毕。


All times are GMT +8. The time now is 07:48 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.