Zen Cart Logo
Forums / General Questions / PHP Memory limit

PHP Memory limit

Locked

Views: 2,895

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
15 Dec 2008, 10:52 AM
#1
dgl_uk_ltd avatar

dgl_uk_ltd

New Zenner

Join Date:
Dec 2008
Posts:
1
Plugin Contributions:
0

PHP Memory limit

HI I have asked my host to increase my php memory limit after finding a post by Dr Byte, This is because sometimes my scripts were timing out, The hosting company sent me back this reply

"PHP has a built-in limit on the amount of memory it will allocate. If that limit is reached, the process will exit with this error message. This is usually the result of the PHP script trying to load a large file, such as an image, into memory all at once. While it is better if you can arrange for the script not to do such things, it is also possible to increase the memory limit to avoid this problem. To do that, edit (or create in your script's folder if it does not exist) the php.ini file with your PHP scripts (create it if it does not exist) and add the following line:
memory_limit=16M

You should replace the '16' with whatever value is appropriate. The default is 8M (8 megabytes, the 8388608 bytes from the error message).

If this does not resolve the problem, you can also increase the web server memory limit by editing (or creating in your script's folder if it does not exist) the ".htaccess" file and adding the following line:
RLimitMem 128000000 "

Sorry for the long post but can anybody point me in the right direction i cannot find a script folder or php.ini

Many Thanks

Jason

15 Dec 2008, 5:08 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: PHP Memory limit

Sorry for the long post but can anybody point me in the right direction i cannot find a script folder or php.ini
They are referring to the script "ZenCart" in your case... but this file "php.ini" can be at the "root" of your account and create in a plain text editor the following - save as php.ini and FTP it to the server

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