Click to See Complete Forum and Search --> : Apache+php+header


Anon
11-30-2001, 09:29 PM
Hi.

Im having trouble sending headers from PHP. Im using a Apache server on my Windows machine for dev. The thing is my script works at my webhotel but not on my own server.

I guess its a configuration problem with Apache.

header('HTTP/1.0 401 Unauthorized');

This give a error 500. The Apache log says "malformed header from script. Bad header=HTTP/1.1 401 Unauthorized"

Anyone know whats wrong?

Anon
04-29-2002, 06:14 AM
you can use this function only in php as an apache modul - not in apache as a cgi.

so your webhotel mybe is a linux-server and so it works

Anon
04-30-2002, 02:22 AM
In u r requirement u are using a apache. your apache should be configured to recognise the content type properly for that u have to comfigure u r apache...may be an addtype directive in the appropriate .htaccess file.
reply
if this works
ankana