Logo
Logo
  • Home
  • Projects
  • Writing
  • Work
  • Request Quote
Logo

Backed by 20+ years of hands-on software development expertise, mithra62 transforms ideas into powerful, reliable solutions—designed to work exactly how you want, every time.

  • Address

    Tucson, AZ 85712
  • Email

    eric@mithra62.com
  • Contact

    +1-310-739-3322

ExpressionEngine White Screen Fix

  • Home
  • Writing
ExpressionEngine White Screen Fix
29 Jul 10
  • Brain Dump
  • Programming
  • Code

The more I work with ExpressionEngine the more I keep running into the same issues. ExpressionEngine hides most error messages, especially those related to configuration, probably for security, but this doesn't make debugging any easier. To be fair, I don't know if this is how ExpressionEngine works out of the box or if this is a configuration setup done by the projects original developers but it does make fixing the issue that much harder.

ExpressionEngine White Screen

Admin White Screen

I've only come across the administration area throwing a white screen when using ExpressionEngine 1.67 on a PHP 5.3 server and only if extensions are enabled. I'm not sure if the newer versions of the 1.x branch have this fixed so this might not work for you.

The issue has to do with how the variables are being passed and called; PHP 5.3 changed how references were handled so the method ExpressionEngine 1.67 uses no longer works. To fix you have to modify "/system/core/core.extensions.php" with the below changes that are on the ExpressionEngine forums:

<?php
//system/core/core.extensions.php around line 115 modify:
if (sizeof($args) == 1)
{
    $args = array($which, '');
}

if (version_compare(PHP_VERSION, '5.3') >= 0)
{
    foreach ($args as $k => $v)
    {
        $args =& $args;
    }
}
?>

<?php
//and likewise around line 174 modify:
{
    $php4_object = FALSE;
    $args = array_slice(func_get_args(), 1);
}

if (version_compare(PHP_VERSION, '5.3') >= 0)
{
    foreach ($args as $k => $v)
    {
        $args =& $args;
    }
}
?>

Front End White Screen

Then there's the front end white screen; so far I've encountered this type of white screen in both the 1.6 and 2.0 branches of ExpressionEngine. Luckily, whenever I've ran into a white screen on the front site it's always due to various path configurations which is easily fixed by over riding the configuration file.

Expression Engine is one of those programs that stores as much as possible in the database including file and path directory paths. To get around this permanently I've gotten in the habit of using a default config.php file for all any Expression Engine site I work on; it's the first thing I do before anything else.

This new configuration file uses the $_SERVER super global to dynamically determine the paths and makes allowances for development, staging and production environments.

<?php
if ( ! defined('EXT')){
	exit('Invalid file request');
}

$conf = "167";
$conf = "";
$conf = "0";
$conf = "1";
$conf = "";
$conf = "";
$conf = "";
$conf = "";

if('dev.site.com' == $_SERVER)
{
	$conf = "";
	$conf = "";
	$conf = "";
	$conf = "";
}
elseif('stage.site.com' == $_SERVER)
{
	$conf = "";
	$conf = "";
	$conf = "";
	$conf = "";
}

$conf = "http://".$_SERVER."/images/avatars/";
$conf = $_SERVER."/images/avatars/";
$conf = "http://".$_SERVER."/images/member_photos/";
$conf = $_SERVER."/images/member_photos/";
$conf = "http://".$_SERVER."/images/signature_attachments/";
$conf = $_SERVER."/images/signature_attachments/";
$conf = $_SERVER."/images/pm_attachments/";
$conf = "http://".$_SERVER."/themes/";
$conf = "http://".$_SERVER;
$conf = "http://".$_SERVER."/images/captchas/";
$conf = $_SERVER."/images/captchas/";
$conf = "http://".$_SERVER."/images/smileys/";
$conf = $_SERVER."/themes/";
$conf = "mysql";
$conf = "exp";
$conf = "0";
$conf = "system";
$conf = "http://".$_SERVER."/".$conf."/index.php";
$conf = "http://expressionengine.com/docs/";
$conf = "";
$conf = "y";
$conf = "y";
$conf = "n";
?>

The above config is for the 1.x branch though most values should work for the 2.x branch with the addition of $config.

Hopefully, this should take care of those white screens.

Recent Post

  • Budget ExpressionEngine SEO in 2025
    Budget ExpressionEngine SEO in 2025
    07 Oct, 2025
  • The Road So Far
    The Road So Far
    30 Sep, 2025
  • I'm Speaking! (...again...)
    I’m Speaking! (...again…)
    27 Apr, 2022

follow us

© Copyright 2025 | mithra62

  • Home
  • Projects
  • Writing
  • Work
  • Request Quote