Blank page on parse errors

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
richardps
Forum Newbie
Posts: 1
Joined: Fri May 12, 2006 2:31 pm

Blank page on parse errors

Post 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();
?>
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
Post Reply