RE: Why cant I load Pg module from my perl CGI under IIS ?

From: Rishi Sharma <rsharma(at)Bigstep(dot)net>
To: "'s0lao(at)netscape(dot)net'" <s0lao(at)netscape(dot)net>, Rishi Sharma <rsharma(at)Bigstep(dot)net>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: RE: Why cant I load Pg module from my perl CGI under IIS ?
Date: 2001-06-21 21:12:34
Message-ID: F902091518C1D411985D0008C7E6566C01FE068A@ned.bigstep.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

Hey SLao,

I had a chance to play with this a little more and I found the problem. The
solution is moving your cgi's under the cygwin tree. There was a few config
issues I ran across.

1 - using Active perl instead of using cygwin perl (thanks for pointing that
out)
2 - trying to read cgi's outside the \cygwin tree. The cgi's needed to be
moved into the cygwin tree. Perhaps this could have been better controlled
by modifying the environment, but moving that did the trick - I'll work with
it.
3 - again making sure your environment is clean and using the cygwin perl.
This includes mime setting under IIS/system path/reference to perl in the
cgi. ( I also changed the registry HKEYLC just in case).

I have a feeling I might have over done it - I need to verify if other
programs are using the win version of perl that was on.

...

bonus - previously the cgi scripts were able to connect to the db using
pg_connect("db_name=xxx"). This notation did not work for me in IIS. I
needed to add other options i.e. (pg_connect("db_name=xxx, host=localhost,
port=5493, user=Administrator)". Hence, my cgi's need to reflect this where
ever a connection was made to the db.

once again - thank you very much for all your helpful insight.

Victory in numbers,

-r

-----Original Message-----
From: s0lao(at)netscape(dot)net [mailto:s0lao(at)netscape(dot)net]
Sent: Thursday, June 14, 2001 11:29 PM
To: rsharma(at)bigstep(dot)net
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: [CYGWIN] Why cant I load Pg module from my perl CGI under
IIS?

Rishi Sharma <rsharma(at)Bigstep(dot)net> wrote:
>
> I can run the following test script in a dos shell by typing:
> >perl test.pl
>
[...]
>
> however, when I convert to cgi this script, it just hangs in my browser.
> What could be wrong with my IIS environment.  The system has all the path,
> ld_library_path, pgdata, pdlib variables set.  
>
> How can I test if Pg is infact in my web server's environment.
>
> Best,
>
> Rishi Sharma.
>
>

Just wondering, IIS hasn't an apache-like ErrorLog configuration directive
(checkbox for EventViewer or textfield for filename or whatever)? It could
ease your pain, as perl certainly errs out the error :)) Why don't you
redirect err (stderr) to a file from the script, anyway ?

Regards,

SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/

Browse pgsql-cygwin by date

  From Date Subject
Next Message Ana Carolina Alonso de Armiño 2001-06-21 22:04:07 postgres 7.0.3 with SuSE 7.1
Previous Message S. L. 2001-06-21 13:37:14 Re: Cygwin PostgreSQL with TCL support (was Re: hi)