Encrypting Web Forms

James Thompson jamest@math.ksu.edu
Fri, 9 Jul 1999 10:55:42 -0500 (CDT)


I've got a form on a web page that I'd like mailed to myself when someone
submits a filled in copy.  I'm attempting to encrypt the data via gnupg
prior to being mailed

Setup:  Apache 1.3.6/php3.0.11/gpg 0.9.8

As a test I did the following in PHP to send an encrypted file via a
shell.

passthru("echo BYE | /usr/local/bin/gpg --batch -ear _MTE_ | mail 
jamest@math.ksu.edu");

which shows me an error message from the mail program 

No message, no subject; hope that's ok 

replacing /usr/local/bin/gpg --batch -ear _MTE_
with cat | sort 
results in BYE being e-mailed to me

replacing /usr/local/bin/gpg --batch -ear _MTE_
with /usr/local/bin/gpg --help
results in the help text being e-mailed to me 


simply opening a shell on the webserver as the user the webserver runs as
and issueing 

echo BYE | /usr/local/bin/gpg --batch -ear _MTE_ | mail jamest@math.ksu.edu

results in the message BYE being properly encrypted and sent to me


I do not understand why I can sucessfully send the gpg --help command via
the web server but I can't encrypt info.  Any ideas?

->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<
James Thompson    138 Cardwell Hall  Manhattan, Ks   66506    785-532-0561 
Kansas State University                          Department of Mathematics
->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<