wiki:DrupalFaq
Last modified 9 years ago Last modified on 07/21/09 10:19:03

Drupal FAQ

PHP Errors

Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)

Appears: on web page

This indicates that Drupal needed more memory than PHP was allowed to give it. This often occurs when enabling a new module. The default memory limit is typically set low (16 MB). To increase PHP's memory limit, modify one of the following:

  • memory_limit = 16M to your php.ini file (recommended, if you have access)
  • ini_set('memory_limit', '16M'); in your sites/default/settings.php file
  • php_value memory_limit 16M in your .htaccess file in the Drupal root

For example, on Ubuntu with Apache configured for FastCGI, you could increase memory in: /etc/php5/cgi/php.ini

See drupal.org/node/76156 for more instructions.