Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP authentication with PHP as CGI

Status
Not open for further replies.

conjurer

Programmer
Joined
Jun 12, 2001
Messages
2
Location
BG
According to the PHP manual, the $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] variables are not available when PHP is running as CGI. Any ideas how to circumbent this issue? To my understanding, they are passed to Apache and it simply does not provide them to CGI scripts, and when PHP is a module it can get them from there, but not when it is running as CGI.

I know that the user is stored in $_ENV['REMOTE_USER'] as well, but as far as I know the password is not stored anywhere. Perhaps someone has written a module for Apache that can do this? Or maybe something else that I'm missing?
 
Because I'm trying to migrate from php as a module to php as CGI. PHP as a module is not an option unfortunately ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top