gtfc100 Posted February 15, 2007 Share Posted February 15, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/38667-php-errors-not-working/ Share on other sites More sharing options...
trq Posted February 16, 2007 Share Posted February 16, 2007 Have you also turned on display_errors ? Quote Link to comment https://forums.phpfreaks.com/topic/38667-php-errors-not-working/#findComment-185918 Share on other sites More sharing options...
fert Posted February 16, 2007 Share Posted February 16, 2007 and did you restart Apache after editing the php.ini file? Quote Link to comment https://forums.phpfreaks.com/topic/38667-php-errors-not-working/#findComment-186005 Share on other sites More sharing options...
gtfc100 Posted February 16, 2007 Author Share Posted February 16, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/38667-php-errors-not-working/#findComment-186190 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.