Issue
I'm trying to move my Project to a linux redhat server that uses Apache but the problem I'm facing there is that this Server has 2 different PHP versions installed.
Symfony (2.5.12) seems to look for the php executable at /usr/bin/php
by default but there is a 5.2 version installed, which is needed for other projects.
At /opt/rh/php55/root/usr/bin/php
is an installed 5.5 version of PHP that I want to use for symfony.
So how can I configure Symfony to use the php version that is installed at the custom path?
Solution
If it's your web application that's using the wrong version of PHP, this is an Apache configuration issue. If it's the command line, this is actually a pretty easy thing to fix, you just need to make sure that /opt/rh/php55/root/usr/bin/
is in your $PATH
before /usr/bin
.
You can do this in your ~/.bashrc
or ~/.bash_profile
with this:
export PATH=/opt/rh/php55/root/usr/bin:$PATH
Just put that at the end, log out and in again. You can also just pop that in your command line directly, but it'll only apply for the current session, so the ~/.bashrc
or ~/.bash_profile
options are better.
Answered By - Kevin Nagurski Answer Checked By - Gilberto Lyons (WPSolving Admin)