Where is the PHP executable on Ubuntu?
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Darkness Approaches Looping
--
Chapters
00:00 Where Is The Php Executable On Ubuntu?
00:43 Accepted Answer Score 11
01:12 Answer 2 Score 1
01:36 Answer 3 Score 13
01:58 Answer 4 Score 19
02:06 Thank you
--
Full question
https://superuser.com/questions/498872/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ubuntu #apachehttpserver #php #ubuntu810
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Darkness Approaches Looping
--
Chapters
00:00 Where Is The Php Executable On Ubuntu?
00:43 Accepted Answer Score 11
01:12 Answer 2 Score 1
01:36 Answer 3 Score 13
01:58 Answer 4 Score 19
02:06 Thank you
--
Full question
https://superuser.com/questions/498872/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ubuntu #apachehttpserver #php #ubuntu810
#avk47
ANSWER 1
Score 19
Type the following in your terminal
whereis php
ANSWER 2
Score 13
I found the executables in /usr/bin/
eg:
- /usr/bin/php
- /usr/bin/php7.0
- /usr/bin/php7.1
ACCEPTED ANSWER
Score 11
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.
ANSWER 4
Score 1
If you are writing your own web server you almost certainly want to install or build the CGI version of the PHP binary, and you will want to implement the CGI protocol in your web server. The CGI version has the required facilities to capture the GET/POST data.
See: