hello there. well I have a problem with my header sending: for some reason nothing except location header doesn't go through and I get 500 error. I'm trying to use this code: <?php header('WWW-Authenticate: Basic realm="my realm"'); header('HTTP/1.0 401 Unauthorized'); exit; ?> I expect to get a pop up window, but all I get is a 500 error. My first guess was that the problem isn't in php but in my apache (1.3.20 for win) so I looked carefully through the httpd.conf and found out that my mod_proxy was off and that it included headers from my files. So I turned it on, but still all I get is 500 when try to send any headers besides location one. it is winxp box with apcahe 1.3.20 and php 4.0.6 thx for any help
cheers, AlCapone
Sounds weird. Try the 401 before the other header. The actual server response has the 401 first...
Dave
=========================================== http://badblue.com/helpphp.htm Free small footprint web server for Windows
yeah that was my first step to fix the problem, but unfortunately didn't work. I'll try to look into apache config again and may be find something there. thanks for answering though
check to make sure there are no spaces or blank lines before your <?php tag.
They will break headers since php/apache will send data before the header() line is called, and the headers can no longer be sent.