User Tools

Site Tools


changethememorylimitforphpscripts

Differences

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

Link to this comparison view

changethememorylimitforphpscripts [2013/01/27 21:29] (current)
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/27 21:29 (external edit)