newbie question "Public key not found" with PHP
Tom Beidler
tbeidler@mindspring.com
Tue, 12 Dec 2000 13:30:21 -0800
Please CC me. I'm not sure if I'm subscribed yet.
I'm having problems using GNUPG for the first time. I'm using it with PHP
and I'll show you my code;
// Set directory for "www"'s key ring
putenv("GNUPGHOME=/var/www/.gnupg");
// Dump email message into indata file
$fp = fopen("/usr/home/dogma/temp/indata", "w+");
fputs($fp, $msg);
fclose($fp);
// encrypt
system("/usr/local/bin/gpg --encrypt -ao /usr/home/dogma/temp/outdata -r
'Joe Schmoe <jschmoe@building.com>' /usr/home/dogma/temp/indata ");
unlink("/usr/home/dogma/temp/indata");
$crypted = "/usr/home/dogma/temp/outdata";
$fd = fopen($crypted, "r");
$mail_cont = fread($fd, filesize($crypted));
fclose($fd);
unlink("$crypted");
I keep getting "Public key not found". The key lines are the "putenv" which
is the directory of the PHP users key ring and "system" which is the actual
command line. I've tried several variations of the public key, ie. 'Joe',
'Joe Schmoe', 'jschmoe@building.com'.
I've tried telneting in as myself and encrypting something and I get the
samething. When I --check-ring it shows that I have both my private and
public key.
Any help would be appreciated.
Thanks,
Tom
>>.>>.>>>.>>>>>.>>>>>>>>>
Tom Beidler
Orbit Tech Services
805.455.7119 (cell)
805.682.8972 (phone)
805.682.5833 (fax)
tbeidler@mindspring.com
>>.>>.>>>.>>>>>.>>>>>>>>>
--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org