Paul Osborne - Java/PHP Developer

Drupal: 500 Internal Server Error on Modules Page

When enabling Drupal modules a 500 Internal Server Error can often appear with the default installation. Too identify the cause of the problem look in the error_log file for your web server.

Each time I have encountered this problem the cause has been due to the PHP memory limit being exceeded. The typical error message if you have allocated 16MB is:

PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 77824 bytes) in /xxx/yyy/zzz/xxx/drupal/modules/node/node.pages.inc on line 221

There are several very easy ways to fix this by increasing PHPs memory limit:

  • 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

See: http://drupal.org/node/76156 for more details.

Post a Comment

Your email is never shared. Required fields are marked *

*
*