I have a site which is using Basic Authentication, visitor can login with predefined credentials. I can reach the $_SERVER["PHP_AUTH_USER"]
variable, so everything works fine here.
But when I'm trying to post data with jQuery AJAX in the same domain, I can't reach the $_SERVER["PHP_AUTH_USER"]
variable (not set in the $_SERVER
).
Environment:
Server version: Apache/2.4.7 (Ubuntu)
PHP Version: 5.5.9-1
Ubuntu: 4.9
(Server API: Apache 2.0 Handler, so not CGI)
Chromium: 41.0.2272.76
Ubuntu 14.04 (64-bit)
Can anyone help with this problem?