You can temporarily return an error report using the error_reporting () function, for example, to show all errors, insert the following code into your file:
error_reporting(E_ALL);
Of course, to change this forever, you have to edit the php.ini file and make sure that you enable error_reporting as well as display_errors (at least if it is not a production environment). You can also try:
ini_set('display_errors', 1);
Although this may not work if you have a fatal error on the page. Again, to enable this constantly, you will have to modify the php.ini file.
It is generally recommended that you enable display_errors only on non-production systems so that users do not receive potentially confidential information through your error messages.
In any case, you should find php errors in the apache error log, on ubuntu this is here:
/var/log/apache2/error.log
Although it depends on your distribution.
gabe. source share