Re: Mysterious \"Premature end of script headers\" error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 01 December 2006 14:10, Boyle Owen wrote:
> > -----Original Message-----
> > From: uxwrstre [mailto:uxwrstre@xxxxxxxxxxxxx]
> > Sent: Friday, December 01, 2006 2:06 PM
> > To: users@xxxxxxxxxxxxxxxx
> > Subject:  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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux