Re: [GENERAL] problems compiling scripts.I'm near suicide
От | Thomas Reinke |
---|---|
Тема | Re: [GENERAL] problems compiling scripts.I'm near suicide |
Дата | |
Msg-id | 37A727CE.43E3C108@e-softinc.com обсуждение исходный текст |
Ответ на | problems compiling scripts.I'm near suicide (Ximo Domenech <ximo.domenech@ival.es>) |
Список | 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
В списке pgsql-general по дате отправления: