I am new to Linux. It's my first time working with the command line and I'm trying to make it a web sever for learning purposes, so I am not going for lamp stack. Instead I am installing all the programs like apache, php, and mysql manually.
I got apache working and php is working as well but the problem I'm facing is that I can't run commands like php -i. Instead I have to run it like path/to/php/bin-directory/php -i.
In Windows we can achieve this by adding environment variables so I looked around, and it seeme like we can do the same thing in Ubuntu. So I modified the /etc/environment file and added the path to php, and I also tried adding the path via this command:
export PATH=$PATH:/path/to/php/bin-directory/
Both these methods worked and added the path to the environment variable. I confirmed it via printenv, but I am still unable to call the php command directly with php -i.
I am not even sure if that's how it's supposed to work, so any suggestions are appreciated.
Thanks
Edit:
Output of a few commands:
