I saw examples of how to encrypt data with GnuPG in the list archives 
but I'm having problems that aren't mentioned.  I've installed the public 
key in the web server users key ring, and if I run the command as the 
web server user it works just fine.  But when the script runs it I get 
nothing returned and no errors.

$command="echo \"$plain\"|gpg -e -a --always-trust --no-secmem-warning --batch -r 

I've tried with and without the --always-trust, --no-secmem-warning --batch 
in just about any order.  If i try to write it to a file with -o the script
does not create the file and there is still no error.

I'm assuming that STDOUT is returned to $encrypted with the backtick operator, 
how to I see what STDERR of gpg command is?  I figure there has to be something
there.  The only thing I can figure is that the environment for the web server
is different than when you su to the web server user. and that's messing things up.

Any help is appreciated, Thanks.

Jeff Bearer, RHCE

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to