Hallo,
ich beziehe mich auf folgende Threads:
http://forum.bplaced.net/viewtopic.php?f=10&t=15282&p=304736&hilit=http+auth#p304736
http://forum.bplaced.net/viewtopic.php?f=6&t=10250&p=242082#p242082
Nach einigen Versuchen lass ich jetzt mal andere drüberschauen in der Hoffnung dass jemand den Fehler findet der mir entgeht:
.htaccess # .htaccess-Datei für AuthPW
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
AuthType Basic
AuthName "NefiTestAuth"
AuthUserFile /users/nefarius2001/www/Test/.htpasswd
Require user aaa bbb ccc
php [code]
PHP Auth_User Test Test this:<?php error_reporting(E_ALL); echo '1:' . $_SERVER['HTTP_AUTHORIZATION']; list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); echo '2:' . $_SERVER['PHP_AUTH_USER']; ?>
[/code]
Ausgabe: [quote]Test this:
Notice: Undefined index: HTTP_AUTHORIZATION in /users/nefarius2001/www/Test/Test.php on line 10
1:
Notice: Undefined index: HTTP_AUTHORIZATION in /users/nefarius2001/www/Test/Test.php on line 11
Notice: Undefined offset: 1 in /users/nefarius2001/www/Test/Test.php on line 11
2: [/quote]
Was mach ich falsch?