Page 1 of 1

Blank page on parse errors

Posted: Fri May 12, 2006 2:34 pm
by richardps
Hi,

My provider recently upgraded their PHP to 4.4.2 and a few settings have changed. However, if I run the following code it works, but when I apply a deliberate mistake (remove a semi-coln for example) which should fail on the parse, I don't get an error, I just get a completely blank page. Can anyone advise me on where to start looking?

Many thanks in advance,
Richard.

Code: Select all

<?php  
ini_set('display_errors' , 'on');
ini_set('display_startup_errors', 'on');
error_reporting(E_ALL);

phpinfo(INFO_CONFIGURATION);   //remove ; here to create parse error and page just loads blank in browser
die();
?>

Posted: Fri May 12, 2006 3:46 pm
by RobertGonzalez
Try switching the call to error_reporting and display errors...

Code: Select all

<?php 
error_reporting(E_ALL);
ini_set('display_errors' , true);
ini_set('display_startup_errors', true);

phpinfo(INFO_CONFIGURATION);   //remove ; here to create parse error and page just loads blank in browser
die();
?> 
Not sure if it will do the trick, but it is worth a shot.