Turning Off PHP Notices and Deprecated Messages


Problem Description

There are PHP notices and deprecated messages filling up the /var/log/httpd/ssl_error_log file.

Resolving The Problem

This problem can be eliminated by updating the php.ini file. The advisory messages do not indicate a fatal error.

To determine the location of your php.ini file, execute the following command:

find /etc -name php.ini

If there are multiple results then the one in the apache directory is the one that needs changing.

The following entry in the php.ini file will disable those notices:

// Turn off Notices and Deprecated Warnings
error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING

Remember to re-start Apache after making any changes.

systemctl restart httpd


Article ID: 912
Created On: Wed, Oct 20, 2021 at 9:45 AM
Last Updated On: Fri, Oct 22, 2021 at 9:11 AM
Authored by: rspielman

Online URL: https://support.nagios.com/kb/article/turning-off-php-notices-and-deprecated-messages-912.html