My modules page is blank, says "page not found" or returns an error message

Last modified: May 2, 2009 - 09:21

If you attempt to load admin/build/modules and get a blank page, a message that says "The requested page could not be found" or a server error, this is most likely a memory issue.

On the admin/build/modules page, all modules are loaded, whether or not they are enabled. This can quickly cause PHP to run out of available memory.

There are two fixes:

  1. Delete the folder for modules that you're not currently using (i.e. those not currently enabled) from your web server. This is the quickest and easiest solution, especially if you have large modules sitting on your server that you're not using.
    • Note: If you had a module enabled at one time, you may wish to first click the "Uninstall" tab on the admin/build/modules page, as this will allow you to remove disabled modules' database tables. Once you delete the files from the server, you won't be able to use the Uninstall tab to remove that module's information from the database.
  2. Increase PHP's memory limit, e.g. to set it to 16MB try one of these:
    • 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

    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. Some people find they need to set the memory to 24M or 32MB or higher (e.g. 96MB is recommended for a site with built-in image processing using ImageAPI GD).

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.

If you get an "internal server error" message when you try to access the admin modules page, read the white screen of death WSOD page because it may be able to solve your problem.

 
 

Drupal is a registered trademark of Dries Buytaert.