Jump to content

PHP errors not working


Recommended Posts

Hi

 

I am using PHP5 on my Windows development machine. My problem is that the php errors won't  play properly. I want PHP to tell me every error so in the php.ini file I have set 

 

- error_reporting = E_ALL

 

An example script is

 

<?php

echo error_reporting();

echo " hello world!";

echo "<p>hello world!";

?>

 

which as you'd expect returns

 

6143 hello world!

 

hello world!

 

 

However if I change the script to the following (note the semi colon missing on line 3)

<?php

echo error_reporting();

echo " hello world!"

echo "<p>hello world!";

?>

 

it should throw me an error - something along the lines of:

 

Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in /.......error_test.php on line 4

 

but it doesn't. It doesn't do anything at all. All I get is a blank screen in the browser and nothing returned at all.

 

Any suggestions?

 

 

 

Hi fellas,

 

 

Thanks for the replies. I had tried the things you mentioned and they didn't seem to work. However, it transpires I had two php.ini files. One in C:\Program Files\Apache Software Foundation\Apache2.2 and one in C:\Program Files\PHP.

 

I was amending the Apache one. I've now deleted that file and amended the one in the PHP file and it works a treat!

 

thanks again for the replies.

 

 

gtfc100

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.