PHP, windows and GNUPGP - output problems

Mike Burgess mike_v_burgess@yahoo.co.uk
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 10.0.0.15] gpg: Signature made
01/07/02 16:24:54  using DSA key ID 696570C2
[Tue Jan 15 20:28:45 2002] [error] [client 10.0.0.15] gpg: Good signature
from "mike burgess (me) <mike_v_burgess@yahoo.co.uk>"


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

I can now encrypt by using:
system("c:/gnupg/gpg --armour -e -r mike_v_burgess@yahoo.co.uk
/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


Mike



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


On Mon Jan 7 15:22:01 2002, Mike burgess wrote:
[original message:
<http://lists.gnupg.org/pipermail/gnupg-users/2002-January/011485.html>]

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?).
Tony
--
Anthony E. Greene <agreene@pobox.com>
PGP Key: 0x6C94239D
AOL/Yahoo Chat: TonyG05
Linux. the choice of a GNU generation. <http://www.linux.org/>


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