Trent Wyman


Drupal 6 - Increase PHP Max Memory Limit and File Upload Limit

Categories:

To increase the default php memory limit and max file upload size in Drupal 6, the following methods can be performed:

If you have access to your php.ini file add this script (recommended):

In your php.ini file:
memory_limit = 96M to your php.ini file
post_max_size = 100000000000
upload_max_filesize = 100000000000

*** A custom php.ini file can also be created adding only the script shown above.
--------------------------------------------------------------------------------------------------------------------

If you do not have access to php.ini or do not want to create a custom php.ini file, add these scripts to the settings.php and .htaccess files:

In the settings.php file:
ini_set('memory_limit', '96M');
ini_set('post_max_size', '10M');
ini_set('upload_max_filesize', '10M');

In the.htaccess file:
php_value memory_limit 96M
php_value post_max_size 10M
php_value upload_max_filesize 10M
------------------------------------------------------------------------------------------------------------------

See also:
http://drupal.org/node/29268
http://drupal.org/node/109994


Announcements

DrupalCon Denver 2012 - I'm Going!

Press Release:
Michael C. Carlos Museum

Read the press release announcing the Drupal redesign of Emory University's Michael C. Carlos Museum. View Press Release