21295 Posts in 5734 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1233 Views |
-
Help - white screen of death

20 July 2011 at 10:29am
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?
-
Re: Help - white screen of death

20 July 2011 at 6:07pm
Hi scoopy.
Check lines 4 and 8 and change $_SERVER[HTTP_HOST] to $_SERVER['HTTP_HOST']
Cheers
-
Re: Help - white screen of death

21 July 2011 at 9:37am
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
-
Re: Help - white screen of death

21 July 2011 at 9:58am Last edited: 21 July 2011 10:01am
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
-
Re: Help - white screen of death

21 July 2011 at 10:14am
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
-
Re: Help - white screen of death

21 July 2011 at 10:31am
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
-
Re: Help - white screen of death

21 July 2011 at 4:56pm
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.
| 1233 Views | ||
|
Page:
1
|
Go to Top |



