Re: Re: Status: 204 and PHP's Content-type

From: Date: Sat, 01 Jul 2000 16:06:24 +0000
Subject: Re: Re: Status: 204 and PHP's Content-type
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-4263@lists.php.net to get a copy of this message
Hi Timo! On Sat, 01 Jul 2000, Timo Haimi wrote: > > > ><? > > > >echo "Status: 204\n\n"; > > > >?> > > > > > > Hello, > > > > > > Hmm strangely enough, if I run that, it gives me 500 Internal server > > error. > > > I didn't succeed even in most basic script, echoing the Content-type > > > >What if you run it from the command line? > From command line it outputs correctly, only the statusline and 2 > linefeeds. When I telnet and get it, the server returns 500 Internal Server > error. Apache log says: Premature end of script headers: /www/test.cgi. As > I said earlier, the format works.. With a normal #!/bin/sh script it works > correctly if I output "Status: 204" and 2 linefeeds.. It's a shame I can't > do what I want to do with /bin/sh ;) > > Any help/ideas are appreciated.. You are not sending a correct HTTP header. That should be: header ("HTTP/1.1 204 No Content"); -- teodor

« previous php.general (#4263) next »