List Info

Thread: authentication with php under fastcgi




authentication with php under fastcgi
user name
2007-10-19 10:08:02
Hi,

When using php under fastcgi REMOTE_USER isn't defined.  It
is necessary
to use REDIRECT_REMOTE_USER.

So the setUsername function in auth.php should look
something like this:

        function setUsername($username)
        {
                if ($username == "") // Use the
current user
                {
                        if ($_SERVER["REMOTE_USER"]) {
                                $this->user = $_SERVER["REMOTE_USER"];
                        } elseif ($_SERVER["REDIRECT_REMOTE_USER"]) {
                                $this->user = $_SERVER["REDIRECT_REMOTE_USER"];
                        }

                }
                else
                {
                        $this->user = $username;
                }
        }

-- 
andy wettstein
unix administrator
department of physics
university of illinois at urbana-champaign

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribewebsvn.tigris.org
For additional commands, e-mail: dev-helpwebsvn.tigris.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )