PHP, windows and GNUPGP - output problems.

Mike Burgess mike_v_burgess@yahoo.co.uk
Mon Jan 7 15:22:01 2002


I am building a system to verify coursework sent to my university using
digital signatures (final project).

I have two boxes: a winxp client and win2kserver (apache).
I can run all options from command line and can verify files/export sigs
from PHP but cannot encrypt. I get the error in apache error log:

[Mon Jan 07 12:24:28 2002] [error] [client 10.0.0.15] gpg: /gnupg/m.txt:
encryption failed: public key not found


Also all output goes to the error log e.g.

[Mon Jan 07 12:33:44 2002] [error] [client 10.0.0.15] gpg: Good signature
from "mike burgess (me) <mike_v_burgess@yahoo.co.uk>"
[Mon Jan 07 13:03:11 2002] [error] [client 10.0.0.15] gpg: Signature made
01/07/02 03:39:23  using DSA key ID 696570C2

a) do I need to tell php/apache in config files details about gpg?
b) do I need to change userid's on keys used to nobody/www as I see in some
documentation? is there a process for this
c) if I use the environment variable  putenv("GNUPGHOME=c:\gnupg\.gpg"); is
this correct? I can verify files with: system("/gnupg/gpg --verify
/gnupg/m.asc ",$out); and get a return of 0.
d) how do I get error log output to where I want it? i.e. not in the error
log
e) the '--status-fd n' option seems to be what I want but it comes up as an
invalid option when used withinphp and I cannot seem to be using it right
from within command line; is the following valid?

gpg --status-fd out.txt --verify m.asc

to send output to out.txt rather than screen? I have tried --logger but this
produces no output either.


Any help would be appreciated - thanks.