0

I've ubuntu 12.04 running LAMP.

Script requirements are:

Ability to run PHP from the command line (CLI) with exec()
Ability to execute background processes with exec("binary > /dev/null &") 

For the first should I install php-cli? or some other package? And for the second one, can anyone explain what it means?

2 Answers2

1

if you want to run PHP scripts from command line, the php5-cli package is required.

sudo apt-get install php5-cli

exec function is implemented in a PHP core (http://php.net/manual/function.exec.php), executing process in a background is realized by your shell (it's not related to PHP or any PHP modules)

jamzed
  • 1,070
0
  sudo apt-get install php5
  sudo apt-get install libapache2-mod-php5
  sudo apt-get install apache2

All above commands will install php and apache on your server and you will get the ability to run php commandline also.