We recently just updated to EasyApache 4 and from what I am told things are no longer really stored in /usr/local/lib/php
, but rather in /opt/cpanel/{version-number}
.
Now, before the upgrade we had an include path in the php.ini
that included both /usr/lib/php
and /usr/local/lib/php
.
My question is, should I now add /opt/cpanel/{version-number}
to this and remove the aforementioned or is there another way this should be handled?
Your php.ini file should be in /opt/cpanel/ea-php{version-number}/root/etc/
If you don't specify include_path
, it will default to:
.;/path/to/php/pear
If you want to specify it, and you want to include PHP's folder, then it should be fine to include:
/opt/cpanel/ea-php{version-number}/
EasyApache4 shouldn't change this for you automatically.
If you upgrade PHP, you can test it in parallel with a staging subdomain before you upgrade your main subdomains. And, while you test, you just need to make the new php.ini file similar to your current PHP version's php.ini, with the difference that you put the correct include_path for the new PHP version.
In summary, you just need to update your php.ini only when you upgrade a major version of PHP. Until then, you don't need to make any changes to php.ini.