Can't get the $PHP_AUTH_USER var under NES3.6

From: Date: Tue, 25 Jul 2000 04:28:28 +0000
Subject: Can't get the $PHP_AUTH_USER var under NES3.6
Groups: php.general 
Request: Send a blank email to php-general+get-7985@lists.php.net to get a copy of this message
I want to use the http auth function,but it seems it doesn't work. Details: I modified the obj.conf as described in the php-4.0.1pl2/sapi/nsapi/nsapi-readme.txt add such lines at the end of obj.conf ...... <Object name="default"> AuthTrans fn=php4_auth_trans </Object> ....... This is the example program : <?php if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm=\"My Realm\""); Header("HTTP/1.0 401 Unauthorized"); echo "Text to send if user hits Cancel button\n"; exit; } else { echo "Hello $PHP_AUTH_USER.<P>"; echo "You entered $PHP_AUTH_PW as your password.<P>"; } ?> The browser I use is IE4,it appears that the program doesn't work,IE ask the usename and password three times,then I get the message: Text to send if user hits Cancel button Althrough I never hit the Cancle button. Who successfully done?Any idea are appreciated. php4.0.1pl2 is run as nsapi module.

« previous php.general (#7985) next »