Problem capturing output from GPG command in shell...


I am uncertain what I am doing wrong here....

I have finally sorted out that it was permissions that were preventing me from running the gpg commands I was trying to run and I can now run them. The problem is that I am having real trouble capturing the output from the commands I am running.

Just to be clear;

$output = shell_exec("ls -l");
echo $output;

does echo to the browser what one would expect ( a long string containing the results of the command).

Unfortunately, when I run this command:

$output = shell_exec("/usr/local/bin/gpg --homedir /usr/home/manager/.gnupg -b test.xml");

and then I echo $output I get nothing out of the variable - I'm stumped.

The command does work - I have run it on the server from the command line and it does sign the document by creating a detached signature (as I want it to do). Am I missing something
Posted On: Wednesday 24th of October 2012 12:32:50 AM Total Views:  343
View Complete with Replies

RELATED TOPICS OF PHP PROGRAMMING LANGUAGE