Back in November I installed my own PHP setup, for version 5.4.9. I thought I had removed it, but apparently not. In December I reinstalled it with yum install php54, and all its packages.
Now I have a problem where CLI seems to be using the custom PHP install, and the main site is using the yum install. I want both the CLI and the site to use the yum install, which is now 5.4.10.
When I do php -v in the CLI, it shows 5.4.9, so I do know it is using the wrong PHP install. This is causing a lot of issues because the custom install didn’t have mysqli installed with it, and it had ftp disabled.
Does anyone know how I can remove the custom install and relink the CLI to the new yum install?
I am using CentOS.
How did you install the “custom” one? This is a very broad question, but here’s some general advice:
Where is it installed?
which phpcan tell you. You can use this to figure out how to uninstall it. For instance, it could be in/usr/localor/opt.Then, edit your
$PATHvariable to put the place where the PHP you want is before the one you don’t want. This will make the PHP you want run first, at least.If you compliled the custom PHP, you might be able to remove it with something like
make uninstall.