For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > September 2004 > Environment variable problem perl 5.8.3









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Environment variable problem perl 5.8.3
Richard Frenkel

2004-09-16, 3:56 pm

I am trying to move a program that uses pgp from a cgi and am running
into problems. Both boxes are Linux. A simple program like the
following works on the old server but not the new:

$ENV{'PGPPATH'} = "/home/kidsart/pgp/pgp6/keyrings";

### this fails!
open(PGP,"/home/kidsart/pgp/pgp6/pgp -kv rich\@infoboard.com |");
while(<PGP> ) {print $_;}

### this works!
open(PGP,"/home/kidsart/pgp/pgp6/pgp -kv rich\@infoboard.com
/home/kidsart/pgp/pgp6/keyrings/pubring.pkr|");
while(<PGP> ) {print $_;}

On the old server, both find the key, on the new server only the
second one does. PGPPATH lets pgp know where to look for keyrings. For
various reasons I need PGPPATH to work.

Any ideas welcome.

Here is more complete output:

## using PGPPATH
Can't open default key ring file
Keyring view error.

## using as a param
Key ring: '/home/kidsart/pgp/pgp6/keyrings/pubring.pkr'Looking for
user ID "rich@infoboard.com".
Type bits keyID Date User ID
RSA 1024 0x2FF50EAF 1997/08/18 Richard Frenkel
<rich@infoboard.com>
1 matching key found.
UNAME...
Linux serve.wwwroot18.net 2.4.22-1.2197.nptlsmp #1 SMP Thu Jul 1
15:07:03 EDT 2004 i686 athlon i386 GNU/Linux
PERL VERSION...

This is perl, v5.8.3 built for i386-linux-thread-multi


ENV...
PGPPATH=/home/kidsart/pgp/pgp6/keyrings
HTTP_KEEP_ALIVE=300
HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.4b) Gecko/20030507
SERVER_PORT=80
HTTP_HOST=www.kidsart.com
HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7
DOCUMENT_ROOT=/home/kidsart/public_html
Richard Frenkel

2004-09-18, 3:55 pm

This is not really a perl problem, feel free to delete it from here. I
ended up using GnuPG which has a command line parameter for home and
it works much better and faster than pgp in anycase. It also imports
pgp keys.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com