Using GnuPG with PHP

From: Date: Thu, 19 Jul 2001 14:50:18 +0000
Subject: Using GnuPG with PHP
Groups: php.general 
Request: Send a blank email to php-general+get-58703@lists.php.net to get a copy of this message
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 public_key"; $encrypted=$command; 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 Webmaster PittsburghLIVE.com

« previous php.general (#58703) next »