How to make GnuPG work with Perl cgi script

Fri Sep 7 18:39:02 2001

I have installed GnuPG on a Linux web server and am trying to use it to 
encrypt information submitted to a web site.

I have written the following two Unix shell scripts to be executed from 
perl scripts.  It works fine from the command line but when I try to get it 
to execute from a web page it refuses.  gpg reports no error, it *acts* 
like it is running, there is no system error returned, but it does nothing.

It is being executed by the user "apache" from the cgi-bin directory.  Is 
there a special option switch to  set in gnupg for this type of 
application?  When I do other unix commands in this fashion - "ls > 
out.txt" for example - it executes and writes to the file just fine from 
this area.

What is my problem?

Thank you,



#encrypt plain text file
gpg --homedir ../data/.gnupg  --always-trust --yes -o ../data/out.crypt -r 
"username"  --encrypt ../data/plain_text.txt 2>>err_gpg.txt

#encrypt stdin
gpg --homedir ../data/.gnupg  --always-trust --yes -o ../data/out.crypt -r 
"username"  --encrypt - 2>>err_gpg.txt