httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uxwrs...@trashmail.net
Subject Re: [users@httpd] Mysterious \"Premature end of script headers\" error
Date Fri, 01 Dec 2006 14:32:26 GMT
On Friday 01 December 2006 14:10, Boyle Owen wrote:
> > -----Original Message-----
> > From: uxwrstre [mailto:uxwrstre@trashmail.net]
> > Sent: Friday, December 01, 2006 2:06 PM
> > To: users@httpd.apache.org
> > Subject: [users@httpd] Mysterious \"Premature end of script
> > headers\" error
> >
> > Hello,
> >
> > I\'m using Apache 1.3.37 on Solaris 8 (SPARC architecture).
> > I have a simple CGI-BIN script which worked before and
> > printed out the following:
> > acwebint 13:57 archive/docs/bin : ./http-goto
> > Location: http://acwebint/DICB
> >
> > acwebint 13:57 archive/docs/bin :
>
> Try running it as the same use who runs apache (see "User"), also watch
> out for add ENVs that it may need (it won't have them when spawned by
> apache).

It's a cgi-bin program written in C.
I saw that httpd was running as http user and the cgi-bin file belongs to a 
web user. So I changed the owner of this http-goto file to http user, but I 
still get the error 500 with this error message.

Now I show you how I execute it in the console:
acwebint 14:22 archive/docs/bin : cat /tmp/testrc 
#!/bin/tcsh
setenv GATEWAY_INTERFACE 'CGI/1.1'
setenv QUERY_STRING 'tools=%2FDICB&x=8&y=3'
setenv REMOTE_ADDR '127.0.0.1'
setenv REMOTE_HOST 'acmp5.hq.lan'
setenv REQUEST_METHOD 'GET'
setenv SCRIPT_NAME '/bin/http-goto2'
setenv SERVER_NAME 'acwebint.lan'
setenv SERVER_PORT '80'
setenv SERVER_PROTOCOL 'HTTP/1.1'
setenv SERVER_SOFTWARE 'Apache/1.3.37 (Unix) mod_jk/1.2.0 mod_perl/1.29 
PHP/4.3.0 mod_ssl/2.8.28 OpenSSL/0.9.8'
acwebint 14:22 archive/docs/bin : source /tmp/testrc 
acwebint 14:23 archive/docs/bin : ./http-goto
Location: http://acwebint/DICB

acwebint 14:23 archive/docs/bin : 
...
$ tail -f errors
[Fri Dec  1 14:23:37 2006] [error] [client 127.0.0.1] Premature end of script 
headers: /home/web/archive/docs/bin/http-goto

-- 
Best regards,
saf

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message