Thread: [Fwd: Re: CGI program cannot access database]

[Fwd: Re: CGI program cannot access database]

From
Maarten Boekhold
Date:

-------- Original Message --------
Subject: Re: [GENERAL] CGI program cannot access database
Date: Fri, 08 Oct 2004 10:34:12 +0400
From: Maarten Boekhold <boekhold@emirates.net.ae>
To: Samik Raychaudhuri <samik@freeshell.org>
References: <4165F78F.7070002@freeshell.org>



Samik Raychaudhuri wrote:
> Hello,
> I am trying to run a perl CGI program for accessing a database. The
> program runs fine from command prompt, producing expected output. But it
> gives errors while running as CGI.

Are you trying to run this under cygwin? If so, there's a very recent
thread on the cygwin mailing list about this. Apache clears the
environment before launching a CGI script, but the winsock API requires
the SYSTEMROOT environment variable to be set. You can configure apache
*not* to remove that variable from the environment.

Maarten


Re: CGI program cannot access database

From
Samik Raychaudhuri
Date:
Hello,
Yes I am trying to run this under Cygwin. My apache server is running
locally, but the postgresql server is running remote at freesql.org.
I tried to search for the thread in postgresql-cygwin, but couldn't find
it. The only thread I came up with is this one:
http://archives.postgresql.org/pgsql-cygwin/2004-07/msg00060.php
This wasn't much helpful.
Can you please post the link to the thread. That will be very helpful.
Regards,
-Samik

On 10/8/2004 1:34 AM, Maarten Boekhold wrote:

>
> Are you trying to run this under cygwin? If so, there's a very recent
> thread on the cygwin mailing list about this. Apache clears the
> environment before launching a CGI script, but the winsock API requires
> the SYSTEMROOT environment variable to be set. You can configure apache
> *not* to remove that variable from the environment.
>
> Maarten
>

Re: CGI program cannot access database

From
Samik Raychaudhuri
Date:
I still couldn't configure apache not to remove the variable from the
environ. Can you please let me know how to do that?
Regards.
-Samik

> On 10/8/2004 1:34 AM, Maarten Boekhold wrote:
>
>>
>> Are you trying to run this under cygwin? If so, there's a very recent
>> thread on the cygwin mailing list about this. Apache clears the
>> environment before launching a CGI script, but the winsock API requires
>> the SYSTEMROOT environment variable to be set. You can configure apache
>> *not* to remove that variable from the environment.
>>
>> Maarten
>>
>