Page 1 of 1

HOW TO increase PHP's Memory Limit?

Posted: Oct 19th, '11, 13:37
by administrator
To increase PHP's Memory Limit you have to edit the memory_limit directive in php.ini but we recommend to set that directive on a site-by-site basis. This helps to keep sites that don't need such a large memory_limit nice and efficient.

Instead you can set the directive in settings.php by adding this line just below the other ini_set lines:

Code: Select all

ini_set('memory_limit', '256M');

- or-

1. Check the target folder permission to 777 or 755 (according to your requirements, using # chmod 777 foldername)
2. Edit the /etc/php.ini by
2.1 Changing upload_max_filesize = xxxM (where xxx is maximum file size in MB)
2.2 Changing post_max_size = xxxM (to match the upload_max_filesize)
3. Restart the httpd service (using # service httpd restart)