0

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?

Brett
  • 19,449
  • 54
  • 157
  • 290

1 Answers1

1

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.

Nuno
  • 3,082
  • 5
  • 38
  • 58
  • Ok thanks. Our php version stayed the same, but we got upgraded to EA4, which caused the different locations for PHP's stuff. – Brett Jul 23 '18 at 18:16
  • Yes, that's how EA4 works. Changes every location, to allow for multiple PHP versions. – Nuno Jul 23 '18 at 19:40
  • Just got around to looking at this, are you sure that's the right directory to set? There doesn't seem to be much in there, seems to be a lot more in folders such as `/opt/cpanel/ea-php{version-number}/root/usr/bin` and `/opt/cpanel/ea-php{version-number}/root/usr/lib64/php/modules`. – Brett Jul 24 '18 at 17:45