I have a strange problem with a php exec() command.
I'm trying to run a perticular gem called iron worker .
exec('iron_worker upload Renode 2>&1',$output,$error);
var_dump($output);
This is the command i am trying to run, but unfornunately it doesn't upload the code to the service, it only displays
------> Creating client
On the contrary, when i run the command with SSH, it works fine, the file is found and the code is uploaded.
If i do a print_r($output); http://pastebin.com/4SLDqQyX
What could be the problem ? The php exec command only stops at the beggining and doesn't continue.
Thank you !
By analysis of the iron_worker source, it looks to use the HOME variable environment and is blocking where no HOME env variable is set.
I suggest you to set the variable with
putenv("HOME=/home/my_user/");
before running the script by PHP.