How to enable module when there is a WSOD (blank page)? Use case: I enabled a module, without enabling the required module. I saved the configuration on the modules page and it showed me the following screen - 


I clicked "Continue" and then I get the WSOD (blank page).

I added error reporting php code in my index.php in root directory. It showed a fatal error - Fatal error: Call to undefined function variable_realm_switch() in /mysite/sites/all/modules/i18n/i18n_variable/i18n_variable.module on line 54

I cannot go back to the admin pages to enable the required module, because of WSOD. Is there a way to enable the module from the code? I cannot delete the modules involved in this error, because I will end up losing the data associated with the modules.
Using phpMyAdmin or any other database management software (or via command line mysql if you are comfortable with that), find the name of the module you wish to enable or disable in the system table. Set the status for that module to 0 for disabled or 1 for enabled.

mysql command:

UPDATE  `database_name`.`system` SET  `status` =  '1' WHERE  `system`.`name` =  'module_name';


phpMyAdmin screenshot:



I also recommend installing Drush on your server. This will allow you to execute commands like enabling/disabling modules, clearing caches, etc. from the command line, which is very handy in situations where you cannot access the Drupal admin because of a WSOD.