Jump to content

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?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/38667-php-errors-not-working/
Share on other sites

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.