ID: 24236 Updated by: [EMAIL PROTECTED] Reported By: webmaster at kobrasrealm dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: Linux PHP Version: 4.3.1 New Comment:
http://www.php.net/features.http-auth User $_SERVER['REMOTE_USER'], that will work. Previous Comments: ------------------------------------------------------------------------ [2003-06-17 22:52:54] webmaster at kobrasrealm dot com Description: ------------ my host used Linux and has PHP 4.3.1 installed (because 4.3.2 isn't compatible with phpsuexec). For a while, everything was running smoothly. I built my own site control panel that sets a cookie when you're logged in from the .htaccess so that a link appears on the main site (http://www.kobrasrealm.com) when there's something the Control Panel can do (e.g. Add/Edit Game who's Description I am currently viewing). However, it suddenly stopped honoring $PHP_AUTH_USER and I tried $_SERVER['PHP_AUTH_USER']. I logged in and then went to a phpinfo file I made to see if I mistyped it, and it wasn't there. I reported it to my host, and they claimed that PHP_AUTH_* is not available in CGI mode. Reproduce code: --------------- $auser = $PHP_AUTH_USER; echo("You are logged in, $auser"); Expected result: ---------------- You are logged in, Kobra Actual result: -------------- You are logged in, ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24236&edit=1