You may need to troubleshoot a site's PHP script--for example, if the site appears as a blank page. A helpful way to troubleshoot these scripts is to enable error-logging in the script.


Some PHP scripts that are part of an application may include an option to enable a development or testing environment. When you enable this environment, the script logs errors to the local error_log file in the site's document root.

If your script does not include such an option, you can add these lines directly into the script, which forces the script to output any errors to the local error_log file:

ini_set('display_errors', 1);

You can then review the errors in the error_log file to determine why the script is not functioning correctly.