My admin > modules page is blank

Last modified: January 6, 2008 - 19:24

This is most likely a memory issue. On this page all modules are loaded, whether they are enabled or not. This can cause PHP to run out of available memory.

There are two fixes:

  1. Remove (unused) modules--the quickest/easiest solution.
  2. Increase PHP's memory limit, either by adding:
    • memory_limit = 12M to your php.ini file (recommended, if you have access)
    • ini_set('memory_limit', '12M'); in your sites/default/settings.php file
    • php_value memory_limit 12M in your .htaccess file in the Drupal root

    Depending on the amount of modules you have enabled and their 'impact' on the site you may need to increase the memory_limit even more. Experiment with what memory value works for your needs.

Note that some hosts allow a php.ini file in the root of your site.

All fatal errors can result in a blank modules page. If you want to be sure if the memory limit is causing this problem, you should check your web server error logs. Hunt for a line that looks like:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 418591 bytes) in /path/to/drupal/includes/database.mysql.inc on line 29

That indicates that Drupal needed more memory than PHP was allowed to give it.

Always keep in mind that generally, "Less is More." The less memory your installation consumes, the faster it is, and the more people can visit your site at one time.

You may have to restart Apache for the configuration changes to take effect, especially if you edit php.ini.

Set memory higher

hansrossel - September 23, 2008 - 14:47

12M will certainly not be enough if you use views or imagecache. I would start from 32MB. Imagecache even recommends 96MB

Hans
KOBA - Drupal Webdesign

 
 

Drupal is a registered trademark of Dries Buytaert.