I´ve read that http authorization with php only works if I have
installed php as an module to apache..!?
If your PHP installation is non-CGI, PHP-based authentication will work (I believe....not having tested the ISAPI version).
And I´m not quite sure if I installed it as an module
If you view the output of phpinfo() it will tell you how it is installed, look for "Server API"...if you're using Apache and you installed it as a module, it will say "Apache".
Also, if your configuration line included "--with-apache" or "--with-apxs", then you installed it as a module.
Warning: Cannot add header information - header already sent by (output
started at /home/httpd/htdocs/hlbtest/auth_old.php:5) in
home/httpd/htdocs/hlbtest/auth_old.php on line 13.
Warning: Cannot add header information - header already sent by (output
started at /home/httpd/htdocs/hlbtest/auth_old.php:5) in
home/httpd/htdocs/hlbtest/auth_old.php on line 14.
And the error refers to :
if(!isset($PHP_AUTH_USER)) {
header ('WWW-authenticate: Basic realm="HLB"'); <-- line 13
header('HTTP/1.0 401 Unauthorized'); <-- line 14
exit;
Can this mean that i´ve not installed php as an module?
No, it means your script is wrong, and you've sent output to the browser (whitespace, html, text, something) around line 5.
If you use header(), you can't have any output to the browser before it.
- julie
+------------------------------------------------+
| Julie Meloni (jcm@i2ii.com) |
| Tech. Director, i2i Interactive (www.i2ii.com) |
| |
| "PHP Essentials" & "PHP Fast & Easy" |
| http://www.thickbook.com/ |
+------------------------------------------------+