I have a php script where some system commands are running fine and others are not. The commands that are not running can be copy and pasted to the shell and be ran just fine.
System: OSX 10.9.2 (everything is updated).
I have tried many different commands like the following.
backticks, exec()
, shell_exec()
, system()
, passthru()
This command works fine.
exec("drush si -y --db-url=mysql://user:pass@localhost:3306/dbname");
But these commands do not run.
exec("drush sql-sync @remote.staging @dev.anme -y");
exec("git ls-remote --heads git@github.com:blablaname/name.git");
The commands that do not run can be copy and pasted into the shell and run great. I have made sure the script is being ran in the proper directory using the getcwd()
function.