Articles in this section

The error_reporting setting is disabled in PHP settings, but PHP notices or warnings still appear in domain's error_log

Plesk for Windows Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Symptoms

  • PHP error_reporting is set to ignore notices, warnings and/or deprecated messages with ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING" set at Domains > example.com > PHP settings , but PHP these records still appear on domain's Logs page and in /var/www/vhosts/example.com/logs/error_log e.g.:

    CONFIG_TEXT: PHP Notice: Undefined index: self in

  • Website code contains error_reporting settings, which include reporting notices, warnings and/or deprecated messages as well e.g.:

    # grep -ir 'error_reporting' /var/www/vhosts/example.com/
    /var/www/vhosts/example.com/cgi-data/config.php: ini_set('error_reporting', E_ALL);
    /var/www/vhosts/example.com/cgi-data/lib/pear/PEAR/RunTest.php: $this->ini_overwrites[] = 'error_reporting=' . (E_ALL & ~(E_DEPRECATED | E_STRICT));

Cause

PHP settings in the website code override Plesk PHP error_reporting settings.

Resolution

Contact website developer to change PHP error_reporting value in the website code.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.