https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


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.

sites/default/settings.php

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.
error_reporting(E_ALL); //Debug
ini_set('display_errors', TRUE); //Debug
ini_set('display_startup_errors', TRUE); //Debug

// END CODE

3. Save the file and reload the page.

==========

Comments

Popular posts from this blog

Enabling HTTPS in Home Assistant

Configuring the FreeBSD Firewall with IPFW

Running Home Assistant on FreeBSD Servers