===============
[root@01 ~]# php -v
-bash: php: command not found
[root@01 ~]#
===============

A common type of message you can see on H- Sphere servers. These kinds of command line messages are displayed because of not specifying PATH variables in .bash_profile file.

The $PATH variable is a list of which directories Redhat will look in for executable files.

To edit the bash_profile, vi .bash_profile then arrow down until you find the line that looks similar to “PATH=$PATH:$HOME/bin”

and add the location of the php binary to the above line in .bash_profile file.

To get the path of PHP you can use the following command
==========
ps aux | grep php
==========

Please note that ‘which php’ command will not work as PATH is not specified. 🙂

Leave a Reply