3 msgProblem with gpg --batch --gen-key
2 msgimporting preference changes
10 msgUsing subkeys to renew an expiring key
1 msg[Announce] Gpg4win 1.0.6 released
1 msg[Announce] Libgcrypt 1.2.3 released
5 msgI don't get it - utf8 on Mac

Help! Gnupg can't run in php program
\ Haibo Liu (28 Aug 2006)
. \ Robert J. Hansen (28 Aug 2006)
. . \ Simon Ruderich (28 Aug 2006)
. . . \ Alphax (28 Aug 2006)
. . . . \ Simon Ruderich (29 Aug 2006)
. \ Haibo Liu (30 Aug 2006)

2 msgRestoring my HTML mails
3 msgtrust signature?
3 msg'sig!3' entry vs 'sig!' entry on certain GnuPG ...
5 msgDecrypting Files Automatically
1 msgFreenigma command line tool
8 msgwhy cissp says this about PGP/GnuPG?
3 msgStructure of pubring.gpg
1 msgThanks all. Re: GnuPG neophyte inquiries.
3 msgBook advice
7 msgGnuPG neophyte inquiries.
2 msgMulti-user gpg-agent question
12 msgWhat does key properties validity and trust 'No...
4 msgProblem retrieving signed and encrypted emails
Subject:Re: Help! Gnupg can't run in php program
Group:Gnupg-users
From:Haibo Liu
Date:30 Aug 2006


 
Thanks for you help.

I now get a solution from www.zend.com.

Try echo system("gpg --help"), then echo
system("gpg --list-keys"). If help works but list
keys does not, then you might try the
following:-

1. Set the following permissions
chmod 777 .gnupg
chmod 666 trustdb.gpg
chmod 604 secring.gpg
chmod 604 random_seed
chmod 644 pubring.gpg

2. use the --homedir setting with gpg
i.e. gpg --list-keys --
homedir /usr/local/home/root/.gnupg
----- Original Message -----
From: "Cameron Metzke" <cmetzke>
To: "Haibo Liu" <lhb>
Sent: Monday, August 28, 2006 11:26 AM
Subject: Re: Help! Gnupg can't run in php program


> Make sure you have the right permissions on your ./gnupg folder and
> relivent files to allow the user www-data to access them, just an idea :)
> Haibo Liu wrote:
>> Hello,
>>
>> Does anybody use GnuPG in PHP program?
>> The server is on Debian OP.
>>
>> I create my key pair in the ./gnupg directory.
>> And the command "gpg --help" runs as normal.
>> But the command "gpg --list-keys" failed.
>>
>> What's the problem?
>>
>> My code is below:
>>
>> <?php
>>
>> $val_return = -1;
>>
>> $cmd = "gpg --help";
>> system($cmd, $val_return);
>>
>> echo "<br>";
>> echo "cmd: $cmd, return code: $val_return<br>";
>>
>> $cmd = "gpg --homedir ./gnupg --list-keys";
>> system($cmd, $val_return);
>>
>> echo "<br>";
>> echo "cmd: $cmd, return code: $val_return<br>";
>>
>> ?>
>>
>> lhb
>>
>> _______________________________________________
>> Gnupg-users mailing list
>> Gnupg-users
>> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>>
>

_______________________________________________
Gnupg-users mailing list
Gnupg-users
http://lists.gnupg.org/mailman/listinfo/gnupg-users


© 2004-2008 readlist.com