eoPh has asked for the wisdom of the Perl Monks concerning the following question:
when executed, the $gpgcommand is printed out, and works if I cut-and-paste the command into a terminal, but not through the perl script. Is this maybe an apache configuration issue?#!/usr/bin/perl $gpgpath = "/usr/bin/gpg"; $gpguser = "xxxxxxxx\@xxxxxxxxx.com"; print "Content-Type: text/html\n"; print "<html>\n<body>\n"; $stdin = <STDIN>; $stdin =~ s/\+/ /g; %form = split(/=|&/, $stdin); $filenum = int(rand 50) + 1; open(OUTMESSAGE, ">tmpMessages/$filenum"); while (($name, $value) = each %form) { $value =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("C", hex($1))/eg; $form{"$name"} = $value; } print OUTMESSAGE $form{'body'}; close OUTMESSAGE; $gpgcommand = "$gpgpath --batch --always-trust --eatr -a -r $gpguser - +o tmpMessages/$filenum.enc -e"; print $gpgcommand; print `$gpgcommand`; print "</body>\n</html>\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ichi) Re: CGI won't execute GPG properly...
by ichimunki (Priest) on Jun 06, 2002 at 18:02 UTC | |
by eoPh (Initiate) on Jun 06, 2002 at 18:32 UTC | |
|
Re: CGI won't execute GPG properly...
by cLive ;-) (Prior) on Jun 06, 2002 at 21:36 UTC | |
|
Re: CGI won't execute GPG properly...
by Aristotle (Chancellor) on Jun 06, 2002 at 19:26 UTC |