Run PHP from the command line

Environment variables are set in /etc/environment. You will find the $PATH variable in this file. This variable stores the path to binaries in various locations.
To add /opt/lampp/bin to the location searched for binary files, just append this path preceded by a : to the path variable.
For example, if the $PATH variable was:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
add /opt/lampp/bin to the end of it, so that it becomes:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/lampp/bin
After doing this, do a source /etc/environment

Comments

Popular Posts