Introduction
This article will cover how to disable PHP Deprecated warnings similar to the following:
PHP Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0
Procedure
There are two methods in which to disable PHP deprecated warnings.
Via WHM:
1. Log into WHM.
2. Go to WHM » Home » Software » MultiPHP INI Editor.
3. Click the Editor Mode tab.
4. Choose the PHP version from the dropdown.
5. Find the "error_reporting" section and add the following line:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
6. Save changes.
Via SSH:
1. Identify the PHP versions php.ini file:
~]# find /opt/cpanel/ -name php.ini
/opt/cpanel/ea-php74/root/etc/php.ini
/opt/cpanel/ea-php73/root/etc/php.ini
/opt/cpanel/ea-php72/root/etc/php.ini
/opt/cpanel/ea-php55/root/etc/php.ini
/opt/cpanel/ea-php54/root/etc/php.ini
/opt/cpanel/ea-php56/root/etc/php.ini
3. Rebuild and restart Apache:
/scripts/rebuildhttpdconf && /scripts/restartsrv_httpd