PHP not displaying errors even though display_errors = On

前端 未结 17 1733
面向向阳花
面向向阳花 2020-12-13 01:31

I have a Ubuntu server running Apache2 with PHP 5. In the php.ini I set display_errors = On and error_reporting = E_ALL | E_STRICT, but PHP is st

17条回答
  •  生来不讨喜
    2020-12-13 02:34

    Though this thread is old but still, I feel I should post a good answer from this stackoverflow answer.

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);
    

    This sure saved me after hours of trying to get things to work. I hope this helps someone.

提交回复
热议问题