Debugging Drupal WSOD Errors
Whenever errors are encountered, content management systems (CMS) like Drupal just stop working without displaying anything, commonly referred to as the "White Screen of Death" (WSOD). Applications that use CMS are usually accessible to the general public, so it is a security risk to allow such systems to always spit out error reports that may give attackers an idea of how a site is configured.
An administrator with command-line access can simply look into the server logs to figure out what went wrong, but this may not always be the case in some shared-hosting services. Alternatively, the administrator can just enable the debugging feature of PHP to determine the error and copy the report, then disable it a few seconds later. The probability that attackers can gain any useful insight in that small time frame is very low.
The following procedure shows how the PHP debugging feature can be enabled in Drupal temporarily.
1. In the Drupal folder, open the file that handles the Drupal settings.
2. Scroll to the bottom of the file and add the lines marked "Debug" as follows.
// BEGIN CODE
// PHP debugging feature. COMMENT OUT THESE LINES AFTER USE.
ini_set('display_errors', TRUE); //Debug
ini_set('display_startup_errors', TRUE); //Debug
// END CODE
3. Save the file and reload the page.
Post a Comment