Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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
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
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,


-----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

Rishi Sharma <rsharma(at)Bigstep(dot)net> wrote:
> I can run the following test script in a dos shell by typing:
> >perl
> 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 ?


Get your own FREE, personal Netscape Webmail account today at

pgsql-cygwin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group