Jump to content

PHP5 Not showing errors?


ZachMEdwards

Recommended Posts

Here's a link to my PHPInfo: http://zachafer.com/phpinfo.php

 

I have:

error_reporting = E_ALL & E_STRICT

display_errors = On

both set in C:\php5\php.ini

 

I have tried restarting Apache, and still nothing.

 

Here's my code to test the errors:

<?PHP
if($dfshijfhsijfhi) {
	echo' hi';
}
?>

Please help! :)

Link to comment
https://forums.phpfreaks.com/topic/203209-php5-not-showing-errors/
Share on other sites

That won't give error because its conditional, try just doing the normal echo:-

<?php

echo $_POST[element];

?>

 

as its not defined anywhere that should give an error, and as there are no ticks there either, you would get an undefined index error presumed constant,  though I wonder why you are trying to induce error condition.

 

Personally I use error_reporting(E_ALL | E_STRICT);

 

and place that at the top of my main index file (or wherever I expect to see something going wrong)

 

Cheers,

RW

Hi there,

 

No matter how the ini file is set, you can overwrite it from the php file you are using - in doing this you can set up your script in a development environment & then just comment out the line when satisfied with your work, ie bug free.

 

Cheers,

Rw

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.