problems compiling scripts.I'm near suicide

Started by Ximo Domenechalmost 27 years ago2 messagesgeneral
Jump to latest
#1Ximo Domenech
ximo.domenech@ival.es

Hi.
I have been compiling scripts for two days, and cannot resolve the
problem with postgres. (working with solaris 2.7)
I don't know if the problem is in the compilation because it isn't
causes errors.
I am compiling with:

gcc x.c y.c z.c -o xyzcgi -L/usr/local/pgsql/lib -R/usr/local/pgsql/lib
-lpq
mv xyzcgi /export/home/httpd/cgi-bin/pruebacgi

When the script is executed from a html page, returned this error to the
navigator:

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

#2Herouth Maoz
herouth@oumail.openu.ac.il
In reply to: Ximo Domenech (#1)
Re: [GENERAL] problems compiling scripts.I'm near suicide

At 22:57 +0300 on 03/08/1999, Ximo Domenech wrote:

Internal Server Error
Premature end of script headers: /export/home/httpd/cgi-bin/pruebacgi

Connection to database 'xyz' OK
DECLARE CURSOR command failed
[error] [client 127.0.0.1] Premature end of script headers

I would say to check two things first:

1) That your first two lines of output are "Content-type: text/html" in
the first line, followed by an empty line. If at all possible,
output these two lines before even opening the database connection.

2) That your DECLARE CURSOR command is within a transaction block.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma