PHP, windows and GNUPGP - output problems

Mike Burgess
Wed Jan 16 03:16:02 2002

This is the command I have used from within php:

system("/gnupg/gpg --homedir c:/gnupg/ --verify /gnupg/m.asc ",$out);

this gives the output 0 ($out), which I gather is the code for 'all ok' but
the rest of the info goes to the apache/error.log file.

[Tue Jan 15 20:28:45 2002] [error] [client] gpg: Signature made
01/07/02 16:24:54  using DSA key ID 696570C2
[Tue Jan 15 20:28:45 2002] [error] [client] gpg: Good signature
from "mike burgess (me) <>"

It does this with or without setting --homedir or the environment variable

I can now encrypt by using:
system("c:/gnupg/gpg --armour -e -r
/gnupg/gpg.exe",$out); works with or without --homedir. I am presuming that
homedir is not needed as the executables and files are specifically named in
the command and in the default location.

One of my final things is to be able to sign a file but this needs input and
the command line in windows does not behave as well as in Unix. So a two
part question:

a) Is there a way of passing the passphrase in windows? 'pipe' does not seem
to work in the same way.
b) Can the output of executions e.g. verify data (two entries in error log)
be piped to a file? Is this a gpg thing or Apache?

thanks again


-----Original Message-----
From: []On
Behalf Of Anthony E. Greene
Sent: 15 January 2002 16:28
Subject: Re: PHP, windows and GNUPGP - output problems

On Mon Jan 7 15:22:01 2002, Mike burgess wrote:
[original message:

Try adding the --homedir option to the encrypt command line. Also make sure
the gnupg directory and the files it contains are readable by the user that
Apache runs as (nobody?).
Anthony E. Greene <>
PGP Key: 0x6C94239D
AOL/Yahoo Chat: TonyG05
Linux. the choice of a GNU generation. <>

Gnupg-users mailing list