Re: [GENERAL] problems compiling scripts.I'm near suicide

From: Thomas Reinke <reinke(at)e-softinc(dot)com>
To: ximo(dot)domenech(at)ival(dot)es
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] problems compiling scripts.I'm near suicide
Date: 1999-08-03 17:33:02
Message-ID: 37A727CE.43E3C108@e-softinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ximo Domenech wrote:

>
> Premature end of script headers: /export/home/httpd/cgi-bin/xyzcgi
>
> In the log file of Apache I can see the same message and other:
>
> Internal Server Error
> Premature end of script headers: /export/home/httpd/cgi-bin/pruebacgi
>
> Connection to database 'xyz' OK
> DECLARE CURSOR command failed

If you are really seeing the above in the log file, it would
indicate that
1) You may have an error in the DECLARE statement causing it
to fail.
2) Most importantly, it looks like you are generating non http
output (i.e. the "Connection to database 'xyz' OK).
A typical header might read
Content-type: text/html<CR>
<Cr>
<HTML> - and rest of html.

As a test, I would start by try running a simple script from
a command line and verifying that the output has the proper
HTTP header on it followed by HTML.

Below is an example of a script that displays the environment
passed to the CGI task on a browser screen (I usually call
this thing "env.sh". Start from something simple like this
and work your way up.

#!/bin/sh
echo "Content-type: text/html"
echo ""
echo "<HTML>"
echo "<BODY>"
echo "<PRE>"
env
echo "</PRE>"
echo "</BODY>"
echo "</HTML>"

> [error] [client 127.0.0.1] Premature end of script headers
>
> Can anyone help me ? Pleeeeeease.
> I dont know how to continue. :-|
>
> Thanks to everyone.

--
------------------------------------------------------------
Thomas Reinke Tel: (416) 460-7021
Director of Technology Fax: (416) 598-2319
E-Soft Inc. http://www.e-softinc.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Artur Pietruk 1999-08-03 17:43:56 Re: [GENERAL] problems compiling scripts.I'm near suicide
Previous Message The Hermit Hacker 1999-08-03 13:50:59 ElephantWear Now Available...