Re: Using GnuPG with PHP

From: Date: Thu, 19 Jul 2001 17:20:58 +0000
Subject: Re: Using GnuPG with PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58751@lists.php.net to get a copy of this message
For anybody who cares I found the problem with the command below, the environment of the webserver user was set to the environment of the user who started it, so it could not find the ~/.gnupg directory so I added the --homedir switch and all is fine. Thanks for the imput however I'll examine popen further. On Thu, Jul 19, 2001 at 10:50:18AM -0400, Jeff Bearer wrote: > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com

« previous php.general (#58751) next »