Skip to main content

On a git pull from remote dev environment to a staging environment running off AWS server... I was greeted with the white screen of death.  While it took me a while to resolve the actual issue, my action plan was as follows:

 

How to resolve:

  1. Look in your log files;
  2. Add a few lines to your index.php file

 

Log files

If you have access via ssh they are usually located in /var/log.  To quickly which files have been updated / altered recently, run the following command when you are in the log files

ls -lht

This will list the files in a single column, ordered by time descending from the top.

Unfortunately, the log files gave me no further clues.  There were no errors showing around the time that I was running the query.

 

index.php + a few more lines

In my situation the log files were of no assistance.  Steps two requires editing the index.php file.  I added the following to the top of my index.php file and reloaded the page:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

Refreshing the page showed the error on load.  In my case, the error was instigated from the call in the index.php file.  It called autoload.php

autoload.php in a standard environment look like:

return require __DIR__ . '/vendor/autoload.php';

But as I'm running Docker with a web/ instance my local looks like:

return require __DIR__ . '/../vendor/autoload.php';

The second is correct locally and stops there.  Not for the dev or staging environments.

 

Related articles

Andrew Fletcher04 Apr 2025
Managing .gitignore changes
When working with Git, the .gitignore file plays a critical role in controlling which files and folders are tracked by version control. Yet, many developers are unsure when changes to .gitignore take effect and how to manage files that are already being tracked. This uncertainty can lead to...
Andrew Fletcher26 Mar 2025
How to fix the ‘Undefined function t’ error in Drupal 10 or 11 code
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor stating “Undefined function ‘t’”. While Drupal’s `t()` function remains valid in procedural code, some language analysis tools — such as Intelephense — do not automatically recognise Drupal’s global functions. This...
Andrew Fletcher17 Mar 2025
Upgrading to PHP 8.4 challenges with Drupal contrib modules
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4 websites, particularly when dealing with contributed modules. While Drupal core operates seamlessly, various contrib modules have not yet been updated to accommodate changes introduced in PHP 8.4.x. This has resulted in...