HOW TO increase PHP's Memory Limit?

Discuss everything related to File Uploader. All versions. Any questions related to the File Uploader developing or using should be posted to this forum.

Moderators: ne_moj, zewa, Milton, vadimako, ne_moj, zewa, Milton, vadimako

Site Admin
Site Admin
Posts: 5988
Joined: Jan 7th, '09, 23:18

HOW TO increase PHP's Memory Limit?

Postby administrator » Oct 19th, '11, 13:37

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)

Return to “ApPHP AJAX File Uploader”