Getting a blank page on your Drupal website?
Don’t worry, this happens sometimes after updating a module, theme, or Drupal core on the server. So we call it as the drupal white screen of death or WSOD
We see version incompatibility problems, incorrect PHP configuration, improper PHP Versions, etc as the top causes while handling WSOD error as part of our Server Management Services.
Today, our article describes how our Support Engineers fix Drupal white screen of death error.
How we sort out Drupal white screen of death error
Many website owners wonder when they get a blank page on their website. Sometimes, they become clueless because it shows no errors on websites and simply gives a white screen instead of contents.
Therefore, to fix the error, we first enable error reporting on the server if it is turned off. To make errors visible on the Drupal website, we can turn on error logging from the Drupal admin area at Home >> Administration >> Configuration >> Development.
Alternately, when we do not have admin access to Drupal, we edit the index.php file in the Drupal main directory and forcefully turn on the error display. Either way, we make use of these errors as a good tool for troubleshooting.
There are many reasons to have a blank screen on websites. It includes,
- Improper PHP configuration
- Multiple PHP Versions
- Insufficient memory_limit
1. Whitespace in PHP File
Often, customers may get a blank screen on their Drupal sites due to a misconfiguration in the PHP file. In fact, single whitespace can cause blank websites too. Often, customers may add whitespace at the end of a PHP file, it can trigger the WSOD error without any indication.
In addition, the PHP syntax errors also can be a reason for a blank screen.
Therefore, our Support Engineers ensure that the PHP file doesn’t contain extra space or any syntax errors. On finding problems, we correct it to make websites working.
2. Insufficient memory_limit
When the sites have many modules, or particularly memory-intensive ones, PHP needs high memory to run. Also, PHP memory_limit is the maximum amount of server memory a single PHP script is needed to run. Each PHP script is independent of each other.
And, when multiple scripts run simultaneously, it can create a memory crunch on the server. This means each PHP file need their own memory to run.
Here, we have an example,
Recently, one of our clients had a problem with his Drupal site. Most of the time, the site had a WSOD error.
On checking, our Support Engineers found that the site didn’t have enough memory_limit. So, we logged into the server as a root user. Then, we edited and increased the memory_limit parameter in the php.ini file.
memory_limit = 128M ;
This fixed the error and the Drupal website started loading fine.
3. PHP configuration problems
Often Drupal migration can result in a white screen of death error. This mainly occurs due to the PHP version and settings mismatch in the source and destination servers.
In such cases, we quickly compare and verify the settings to make the website working. We always do a website preview prior to the DNS migration of the website. Thus, we proactively avoid website downtime too.
[Need assistance to fix the Drupal white screen of death errors? We’ll help you.]
Conclusion
In short, the top most reasons for the Drupal white screen of death error can be improper PHP configuration, incorrect PHP versions, code errors, etc. Today, we saw how our Support Engineers fix WSOD error in Drupal.
0 Comments