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
Posted by: - Wed, Oct 20, 2021 at 9:45 AM. This article has been viewed 3085 times.
Online URL: https://support.nagios.com/kb/article/turning-off-php-notices-and-deprecated-messages-912.html

Powered by PHPKB (Knowledge Base Software)