How to enable displaying php error messages on site - Sentto/Sentto-University GitHub Wiki

Temporary displaying of PHP errors is important and helpful for solving different problems on the website. For example:

  • Blank page will be displayed instead of content on your site or
  • 500 Error message will be displayed.

Displaying blank page is mostly caused by some PHP error in the code. If error reporting is on (displaying PHP errors is enabled) then it is very easy to find the error and solve the problem.

You can set PHP error reporting on in php.ini file (in case you have access to this file). Set the following lines:

error_reporting  =  E_ALL
display_errors = On

refer to: http://www.phoca.cz/documents/16-joomla/336-how-to-enable-displaying-php-errors-on-site

###Example #1 error_reporting() examples

<?php

// Turn off all error reporting
error_reporting(0);

// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);

// Report all PHP errors (see changelog)
error_reporting(E_ALL);

// Report all PHP errors
error_reporting(-1);

// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);

?>

refer to http://php.net/manual/en/function.error-reporting.php