phplearner2008 Posted September 27, 2008 Share Posted September 27, 2008 Hi, My browser does not report any errors. I have php5.0 and apache web server. How do I configure it to show errors in php script. I am a newbie. Anyone who can explain in detail? Link to comment https://forums.phpfreaks.com/topic/126025-how-to-configure-php-to-show-errors/ Share on other sites More sharing options...
peranha Posted September 27, 2008 Share Posted September 27, 2008 at the top of the php page put error_reporting(E_ALL); Or you can change it in the php.ini file. Link to comment https://forums.phpfreaks.com/topic/126025-how-to-configure-php-to-show-errors/#findComment-651735 Share on other sites More sharing options...
phplearner2008 Posted September 27, 2008 Author Share Posted September 27, 2008 Should I include error_reporting(E_ALL); in php.ini file? Is that all? Link to comment https://forums.phpfreaks.com/topic/126025-how-to-configure-php-to-show-errors/#findComment-651738 Share on other sites More sharing options...
xtopolis Posted September 27, 2008 Share Posted September 27, 2008 no, simply put it like this <?php error_reporting(E_ALL); //rest of your page script ?> php.ini uses something like ini_set "error_reporting" 1 <~-- I DONT KNOW THIS ONE, LOOK IT UP IF YOU USE IT Link to comment https://forums.phpfreaks.com/topic/126025-how-to-configure-php-to-show-errors/#findComment-651742 Share on other sites More sharing options...
wildteen88 Posted September 27, 2008 Share Posted September 27, 2008 Should I include error_reporting(E_ALL); in php.ini file? Is that all? You also need to make sure display_errors is enabled too. error_reporting and display_errors can be set both within the php.ini and/or during runtime (within your PHP script) Link to comment https://forums.phpfreaks.com/topic/126025-how-to-configure-php-to-show-errors/#findComment-651874 Share on other sites More sharing options...
etabetapi Posted September 27, 2008 Share Posted September 27, 2008 I enabled this for the first time today after manually setting up apache (that was fun.) One caveat, if you use control-f to find display_errors it's the second result that you want not the first. The first one will be commented out with a semicolon preceding it, the latter one is on line 392(?) and is not commented. Link to comment https://forums.phpfreaks.com/topic/126025-how-to-configure-php-to-show-errors/#findComment-651905 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.