Turn on in browser error reporting in PHP
When developing in PHP it’s easier to deal with errors when you see them in your browser. It’s the quickest and easiest way to see them and eventually fix them. This solution will use PHP 5.2.8.
For this example I’ll be using the php.ini file on a Windows operating system. You should find the php.ini in the following directory..
C:\Program Files\PHP\php.ini
Open this file in a text editor such as Notepad.
On line 354 there should be a line which reads: error_reporting = E_ALL. Make sure this is uncommented (remove any semi-colon from the left of that line). On line 373 these should be a line which reads: display_errors = Off.
Edit that line so it reads display_errors = On. Save the php.ini file and restart your web server – the quickest way to do this is to bring up a command prompt and type “iisreset“.
Be aware that display_errors should only be turned on in a development environment for test purposes only!
Add to Favourites