0

From the command line:

php --info
//⇒ PHP Version => 5.5.18

From the command line within a background process:

exec('php --info>>logs/phpVersion.txt');
//⇒ PHP Version => 5.5.14

I want the background process to run version 5.5.18 (or the same version as the web server). Where is that configured?

Mooseman
  • 18,763
  • 14
  • 70
  • 93
Mark Salvatore
  • 628
  • 1
  • 7
  • 13

2 Answers2

2

You must reinstall 5.5.18 to replace 5.5.14. It's not a configuration file, there are two instances of PHP.

If you specify on OS, I will update this answer with further instruction. (Or just Google it)

Mooseman
  • 18,763
  • 14
  • 70
  • 93
0

A simple solution for getting the MAMP version of PHP to run a background process instead of your system's version of php, is to simply call your MAMP version, right there in the exec() function. So for me, that call looks something like this:

exec('/Applications/MAMP/bin/php/php5.5.18/bin/php myscript.php &');

Mark Salvatore
  • 628
  • 1
  • 7
  • 13