Missed predefined variables in HTTP Authentification
I'm facing somet开发者_如何学Gohing weird, after move one of my application to different server/host provider(from centOS to Ubuntu Server). So basicly, i have simple http authentification as auth module in that app. It uses predefined value, in environment variables, which is : $_SERVER['PHP_AUTH_USER']
and $_SERVER['PHP_AUTH_PW']
. As you can see on my title, for somehow reason, these predefined value which i used in my auth module, is missing!
I check my environment setting, in my php.ini, since by these link : http://www.php.net/manual/en/features.safe-mode.functions.php
mention that In safe mode, the variables PHP_AUTH_USER, PHP_AUTH_PW, and AUTH_TYPE are not available. I try set it on/off without different result. And REMOTE_USER
var is not available too in my case.
Someone ever face something like these? Any suggestion?
Anyway, thanks.
This is a known problem. Have a look at
https://github.com/cweiske/SemanticScuttle/blob/master/www/api/httpauth.inc.php
for an example how to fix the problem.
精彩评论