Where is the PHP executable on Ubuntu?
Type the following in your terminal
whereis php
I found the executables in /usr/bin/
eg:
- /usr/bin/php
- /usr/bin/php7.0
- /usr/bin/php7.1
You need to install the php5-cli
or php5-cgi
package.
sudo apt-get install php5-cli
# OR
sudo apt-get install php5-cgi
As Zoredache noted in the comment. cli version doesn't process headers nor dos output them - it's sort of clean PHP interpreter completely unaware of HTTP.
If you want version capable of above mentioned, use the CGI version.