www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/25/21:36:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sun, 26 Sep 2004 03:36:27 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Reply-To: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
Message-ID: <1645302901.20040926033627@familiehaase.de>
To: Brian Dessent <brian AT dessent DOT net>
CC: cygwin AT cygwin DOT com, lighttpd AT lists DOT kneschke DOT de
Subject: Re: lighttpd - problems with cgi scripts
In-Reply-To: <41560B26.FCC450C7@dessent.net>
References: <4155E9CE DOT 5060903 AT familiehaase DOT de> <41560B26 DOT FCC450C7 AT dessent DOT net>
MIME-Version: 1.0
X-IsSubscribed: yes

Hallo Brian,

Am Sonntag, 26. September 2004 um 02:19 schriebst du:

> "Gerrit P. Haase" wrote:

>> #!/usr/bin/perl
>> 
>> use strict;
>> use CGI::Carp qw(fatalsToBrowser);
>> 
>> print "Content-type: text/html\n\n";
>                                 ^^^^^
> This is not a valid CGI script.  All HTTP headers must be terminated by
> CRLF, so you'd have to use "\r\n\r\n" here.  But it's generally regarded
> as a bad thing to explicitly emit headers yourself if you're using the
> CGI module, which takes care of all such things for you.  As you noted
> your example that does it the right way (by calling header()) works
> fine.

That works, thanks for pointing this out, however, lighttpd should
simply give back an error instead of burning my cpu.



>> However, I have a complex script here which works.  There I get an error
>> when I try to connect a postgres database, DBI says:
>>    could not create socket: Operation not permitted
>> 
>> I tried to connect from perl to postgres that works, then I tried the
>> same script calling from lighttpd, it fails with the above mentioned
>> symptoms.

> This sounds suspiciously like the "SYSTEMROOT being removed from the
> environment" problem.

Hmmm, SYSTEMROOT:
$ set | grep SYSTEMROOT
SYSTEMROOT='C:\WINNT'

Doesn't a cygwin application need to know about CYGWIN_ROOT instead of
SYSTEMROOT?

I'll see if I can find the thread about it in the archives.


Gerrit
-- 
=^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019