Php command line

I have a problem with php versions at centos dedicated server.
I set my site to run with 5.6 version (There are also other versions as 5.3 and 5.5) but I want to run some php scripts (composer setup) via command line but I see that php 5.4 is used by command line.
How can I use 5.6 php via command line?

essentially, call the php 5.6 executable (which is not linked in the OS’ Path). or update the OS’ php.

My problem is that I do not know the path of php 5.6.
How can I find it?

the php.exe executable is normally directly inside of the php (or php56)
folder

the exact path will depend on where you have installed it.

In the command window try locate php.exe

I would have thought the path was already set, if it is try php echo “it works”

The folder is /opt/plesk/php/5.6/bin/
Now I want to install mongo driver for php for this php 5.6
I did install this driver at php 5.4 that is centos “main php”
Any ideas? I tried to copy/paste at /modules folder of php 5.6 the mongo.so but it does not seem to work

1 Like

you essentially do the same, only that you need to use the other php executable.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.