Jump to:

23355 Posts in 17702 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Help - white screen of death

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1777 Views
  • scoopy
    Avatar
    Community Member
    3 Posts

    Help - white screen of death Link to this post

    I've taken on managing this site http://foxtrotters.co.nz/ that has recently thrown up the white screen of death. I've turned on error reporting and these are the errors:

    Notice: Use of undefined constant HTTP_HOST - assumed 'HTTP_HOST' in /home/foxtrotter/domains/foxtrotters.co.nz/public_html/foxtrotters/_config.php on line 4

    Notice: Use of undefined constant HTTP_HOST - assumed 'HTTP_HOST' in /home/foxtrotter/domains/foxtrotters.co.nz/public_html/foxtrotters/_config.php on line 8

    _config file:

    <?
    error_reporting(E_ALL);

    if($_SERVER[HTTP_HOST] == "test") {
       header("Location: http://test.totallydigital.co.nz$_SERVER[REQUEST_URI]");
       die();
    }
    if($_SERVER[HTTP_HOST] == "dev") {
       header("Location: http://dev.totallydigital.co.nz$_SERVER[REQUEST_URI]");
       die();
    }

    global $project;
    $project = "foxtrotters";

    $databaseConfig = array(
       "type" => "MySQLDatabase",
       "server" => "localhost",
       "username" => "xxxxxxx",
       "password" => "xxxxxxx",
       "database" => "xxxxxxx",
    );

    Director::addRules(100, array(
    ));

    Debug::sendLiveErrorsTo("support@silverstripe.com");

    Security::setDefaultAdmin("", "");

    ?>

    Have a look for yourself.

    Any ideas?

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: Help - white screen of death Link to this post

    Hi scoopy.

    Check lines 4 and 8 and change $_SERVER[HTTP_HOST] to $_SERVER['HTTP_HOST']

    Cheers

  • scoopy
    Avatar
    Community Member
    3 Posts

    Re: Help - white screen of death Link to this post

    Thanks for your help.

    Unfortunately it didn't help.

    Line 4 is:

    header("Location: http://test.totallydigital.co.nz$_SERVER[REQUEST_URI]");

    Like I said I took of the management of this site. The site has recently been moved to my server. But it was going for a few months until a few days ago. I have no idea who "http://test.totallydigital.co.nz" is. Do I need to change this?

    Thanks

    Scoopy

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: Help - white screen of death Link to this post

    Uhmm, well...

    change header("Location: http://test.totallydigital.co.nz$_SERVER[REQUEST_URI]"); to
    header("Location: http://test.totallydigital.co.nz$_SERVER['REQUEST_URI']");

    Those if-statements send you to the servers test.totallydigital.co.nz, or dev.totallydigital.co.nz if the value of $_SERVER['HTTP_HOST'] is 'test' or 'dev'.

    BUT if you don't have a clue who or what totallydigital.co.nz is, I would advise to delete these two if statements
    and have a nice long talk to the guy from whom you've taken the site.

    Cheers

  • scoopy
    Avatar
    Community Member
    3 Posts

    Re: Help - white screen of death Link to this post

    I've deleted the if statements but still getting the error. Now reads:

    <?

    global $project;
    $project = "foxtrotters";

    $databaseConfig = array(
       "type" => "xxxxx",
       "server" => "xxxxx",
       "username" => "xxxxxx",
       "password" => "xxxxxx",
       "database" => "xxxxx",
    );

    Director::addRules(100, array(
    ));

    Debug::sendLiveErrorsTo("support@silverstripe.com");

    Security::setDefaultAdmin("", "");

    ?>

    Thanks again for your help

    Scoopy

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: Help - white screen of death Link to this post

    Yeah, I can see the same error as well... strange... now I'm stuck...

    Might be a really dumb question, but you have uploaded the new, edited _config.php to your server, right?

    Or what happens if you add the line
    echo 'my _config works!';
    before the line with global $project;?

    Cheers

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Help - white screen of death Link to this post

    FYI totallydigital used to be what SilverStripe Limited used to be called. We morphed into SilverStripe from totallyd around 2006.

    You can remove that header line completely - if you wanted to know why we had that it's because we normally use local references on our internal network (i.e test/site rather than test.silverstripe.com/site) that line redirected test/site to the full version.

    Debug::sendLiveErrorsTo("support@silverstripe.com");

    You may also want to remove that line, our support admins will probably not want to know your passwords.

    1777 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.