LAMP Appliance - PHP Command Line Not Found

Bo's picture
Obviously php works from calls through apache, since apache has been extended with php. However, we have php scripts designed to run as cron jobs, requiring command line execution. I did a server-wide find on php, php5, etc. with no luck locating it. I presume a simple install is required, but thought I would ask the forum for guidance before continuing with any apt-get's, yum's or whatever's... Caught me by surprise that a LAMP would not have command line php support out-of-the-box, and suggest this addition for future builds -- unless I am missing something... Thanks in advance for any help.
Jeremy Davis's picture

apt-get update
apt-get install php5-cli

If you are looking for other php (or other) stuff you can search from command line like this

apt-cache search php
Bo's picture

Thanks.

Bo

Bob's picture

Trying to get ZendFramework 2 tutorial app installed, trying to run first step: php composer.phar self-update and kept getting: -bash: php: command not found. Basic stuff, but I didn't know cli support had to be installed.

Thanks! 

Post new comment