White page

Dear All,
I have blank page in php and I purposely put a syntax error and I try to put this script at the top to show the error but it never appear. I have even tried the .htaccess method and put in to my folder still no error appearing. Any suggestion please.

<?php
error_reporting(E_ALL);
ini_set(‘display_errors’, TRUE);
ini_set(‘display_startup_errors’, TRUE);
?>

Dear Lee,
No is apache server on linux server on a remote pc. Thank you.

are u testing on localhost with WAMP/XAMP ?

for WAMP, left click on the little white icon, PHP -> PHP settings -> ‘display errors’

Dear Guido,
Exactly that is what I want to know why on my side I just get a blank page no error given. Thank you.

And that simple code gives me an error:

Parse error: syntax error, unexpected $end in xxxxxxxxxxxxxxxxxxx/test3.php on line 3

Now why doesn’t it show the error to you… I have no idea. Could be some server setting? Let’s see if anyone else has an idea.

Dear Guido,
Sorry I was just trying a simple code like this
<?php
echo "test123
?>

You’re welcome.
I understand your question. Normally, the error would show up without any special work from your part, wouldn’t it? So without any code it’s hard to help you. And if you don’t answer any questions it’s even harder.

A blank page in PHP? A PHP script that results in a blank page in your browser I guess.
Did you look at the HTML code of the page in your browser?
Do you call the PHP page directly, or is it included inside another page?
Could you post some code?

Dear Guido,
No I know where is the error. I purpose put the error to enable it to show there is error.Yes the page is a mix of html and php code.So I just want to enable it to show where is the syntax error which I have purposely put in. Thank you.

did u have exit(); or die(); or return 0; before the execution of ur broken code?

Try un commenting the error reporting in php.ini. You may have to restart Apache for the changes to take effect.


error_reporting(-1);
ini_set('display_errors', true);

or try edit .htaccess

php_value display_errors 1
php_value display_startup_errors 1