Page 1 of 1

Re: Setting display_errors in the hosting template?

Posted: Mon May 11, 2015 8:23 pm
by skurudo
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini

search display_errors and set on

/etc/init.d/apache2 restart
or httpd, if you use centos/rhel

Other way - code:

Code: Select all

<?php

    error_reporting(E_ALL); ini_set('display_errors', '1');
    echo "Hello world";
    owieufpowiejf

?>

Re: Setting display_errors in the hosting template?

Posted: Wed May 13, 2015 5:36 am
by skurudo
GreenUnicorn wrote:seems to work as phpinfo() reports
but oddly that particular site still doesn't show the errors
the reason might be elsewhere though
Yep, may be you show us phpinfo output?

Re: Setting display_errors in the hosting template?

Posted: Mon Jun 01, 2015 2:16 pm
by skurudo
You can also enable it in your PHP script usually:

Code: Select all

ini_set("display_errors", 1);
ini_set("track_errors", 1);
ini_set("html_errors", 1);
error_reporting(E_ALL);
If that doesn't help, then try a quick workaround first:

Code: Select all

set_error_handler("var_dump");
(Could be used to replicate the original behaviour, if it's suppressed by some other circumstance.)