Drupal 6 Custom Module Causes WSOD

You created a custom module and tried to setup a theme function with it. After changing an Administration setting, you get the WSOD (white screen of death) on all pages. There are no errors in the Apache or PHP error logs. This is not a memory or time out issue. You screwed up in your module 😉


# Disable your module
update yourdrupaldatabase.system set status = 0 where filename like 'sites/all/module%' and name like 'your_custom_module_groups_%';

# Remove main cache
delete from yourdrupaldatabase.cache;

# Remove all other cache tables.
delete from yourdrupaldatabase.cache_*

Now you should be able to access the site. After you remove any template references in your module code and delete any .tpl files, you can safely re enable your custom module:

update yourdrupaldatabase.system set status = 1 where filename like 'sites/all/module%' and name like 'your_custom_module_groups_%';

Cheers, strick.

Leave a Reply

Your email address will not be published. Required fields are marked *