0

I have an issue. When I run:

try {
 $as
  ->setForename($_POST['fname'])
  ->setSurname($_POST['sname'])
  ->setEmail($_POST['email'])
  ->setUser($_POST['user'])
  ->setPass($_POST['pw'])
  ->setPhone($_POST['tel'])
  ->setMobile($_POST['mob'])
  ->setJob($_POST['job'])
  ->setAuth($_POST['auth'])
  ->addProcess();
}
catch (Exception $e) {
 echo $e;
}

I get "white screen of death" however when I use:

$as
 ->setForename($_POST['fname'])
 ->setSurname($_POST['sname'])
 ->setEmail($_POST['email'])
 ->setUser($_POST['user'])
 ->setPass($_POST['pw'])
 ->setPhone($_POST['tel'])
 ->setMobile($_POST['mob'])
 ->setJob($_POST['job'])
 ->setAuth($_POST['auth'])
 ->addProcess();

It all works fine. I am really confused please help, thanks in advance.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Kyle Hudson
  • 898
  • 1
  • 14
  • 26

1 Answers1

1

The try-catch block seems to be fine, try putting these lines on top of your script to see the possible error:

ini_set('display_errors', true);
error_reporting(E_ALL);
Sarfraz
  • 377,238
  • 77
  • 533
  • 578
  • @sAc: I have: error_reporting(E_ALL); ini_set("display_startup_errors",1); ini_set("display_errors",1); As an included header. – Kyle Hudson Jul 26 '10 at 15:45
  • Its working again now, we havent changed any code! A weird one. – Kyle Hudson Jul 26 '10 at 15:49
  • 'White screen of death's usually indicate a syntax error, so any `ini_set` & `error_reporing` method will NOT be executed. Set the values in `php.ini` or `.htaccess` and try again. – Wrikken Jul 26 '10 at 15:50
  • @Wrikken: Setting any ini vars in .htaccess caused http 500 internal server errors in the past. – Kyle Hudson Jul 26 '10 at 15:53
  • @Kyle Hudson: If it runs fine sometimes and not at other times then most surely it is not syntax error. It is some other issue, probably with server. – Sarfraz Jul 26 '10 at 15:53
  • @sAc: Quite possibly the server, should be migrating to a new one soon, will see if the error returns. Thanks to everyone for their insight :D – Kyle Hudson Jul 26 '10 at 15:56