hi there!!
I had the same problem as you described! When I had:
Director::isDev()) BasicAuth::protect_entire_site();
In windows it worked fine, but when i uploaded the code to a linux server...i couldn't pass the protection...so i searched a couple of things....and i found a solution for my problem.
(http://www.besthostratings.com/articles/http-auth-php-cgi.html)
in .htacess, inside <IfModule mod_rewrite.c>
i added this: RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
after i done a incursion inside the core (i didn't like that but for a major reason...), file: BasiAuth,php
and in the function
static function requireLogin($realm, $permissionCode = null, $tryUsingSessionLogin = true) {
...
and after
if(!Security::database_is_ready() || (Director::is_cli() && !$isRunningTests)) return true;
i added:
if(isset($_SERVER['HTTP_AUTHORIZATION'])&& !empty($_SERVER['HTTP_AUTHORIZATION'])){
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
}
And...this done the trick!
Hope this help you and other people with the same problem!
Regards!