Debugging

Many hosting providers have error reporting switched off by default, and users cannot change the configuration. You can check the settings for your host using phpinfo as follows.



In the case where error reporting isn't given automatically, accessing the PHP page in your browser displays a blank page. However, you can still debug the code and see what the syntax error is by creating a separate PHP file and including the code which is failing, as follows.



Note: The messages will be displayed back to the browser, so this method shouldn't be used for pages that the user will see.