User Tools

Site Tools


changethememorylimitforphpscripts
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


changethememorylimitforphpscripts [2013/01/28 04:29] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Change the Memory Limit for PHP Scripts ======
 +**WARNING:** Always make a backup of php.ini before making changes to it.
  
 +If you are doing this as root, you do not need to use 'sudo' at the beginning of the commands.
 +  - Open your php.ini file. (Most often it is in the /etc/ directory)
 +      <file>sudo nano /etc/php.ini</file>
 +  - Locate the following setting:
 +      <file>memory_limit '' 8M ; Maximum amount of memory a script may consume (8MB)</file>
 +  - Replace the '8M' with the desired setting, ie Cacti recommends 512M or better.
 +  - Press 'Ctrl+O' and then 'Enter'.
 +  - Press 'Ctrl+X' to exit.
 +  - Restart Apache Server with the following command:
 +      <file>sudo /etc/init.d/httpd restart</file>
 +
 +
 +-- Main.FredPettis - 02 Jun 2009
changethememorylimitforphpscripts.txt · Last modified: 2013/01/28 04:29 by 127.0.0.1