Re: [GENERAL] problems compiling scripts.I'm near suicide
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/pruebacgiConnection 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
Import Notes
Reference msg id not found: 37A749A9.FB271AA@ival.es
On Tue, Aug 03, 1999 at 06:57:29PM -0100, 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/pruebacgiConnection to database 'xyz' OK
DECLARE CURSOR command failed
[error] [client 127.0.0.1] Premature end of script headers
It means that there is something wrong near "declare cursor" in
your source code. First of all check syntax of delcare cursor. If
everything is OK you should check permissions for all tables etc. inside
"declare cursor", if they are accessible to account 'nobody' (assuming
that your web-serwer is runnig as a nobody user). You should have postgres
account nobody (create it by shell-command 'createuser nobody') and
permisions (run psql your_database_name and than enter e.g.:
'grant all on your_table_name to nobody' ). You should also check
pg_hba.conf.
Good luck!
--- Artur Pietruk, arturp@pdi.net
Import Notes
Reply to msg id not found: 37A749A9.FB271AA@ival.esReference msg id not found: 37A749A9.FB271AA@ival.es | Resolved by subject fallback