Re: PEAR Auth package woes [message #178376 is a reply to message #178375] |
Tue, 12 June 2012 00:34 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 6/11/2012 8:32 PM, Eli the Bearded wrote:
> I've looked over the (sparse) docs here:
>
> http://pear.php.net/manual/en/package.authentication.php
>
> And I can find no mention of using this in a multiple webserver
> configuration, that is N web servers (possibly with M database
> servers) for N> 1 all trying to use the same authentication
> cookies.
>
> In my experiments with N=4 and M=1, I cannot get the servers
> to recognize cookies set by other servers. I only used this
> package instead of writing my own because I was assured it did
> work for the M=1 case. Unfortunately the person who gave me
> that advice is not available to talk to for another week or so.
>
> Is there some secret setting to get this to work?
>
> My configuration looks like this:
>
> function loginFunction($username, $status, $auth) {
> // make a login page then exit so nothing else gets shown
> exit;
> }
>
>
> $options = array(
> 'dsn' => $dsn,
> 'usernamecol' => 'username',
> 'passwordcol' => 'password',
> 'table' => 'site_auth',
> 'db_fields' => array('name',
> 'company',
> 'user_id'),
> 'cryptType' => 'crypt',
> 'db_options' => array('portability' =>
> MDB2_PORTABILITY_ALL ^
> MDB2_PORTABILITY_FIX_CASE)
> );
>
> $a = new Auth("MDB2", $options, "loginFunction", $optional);
>
> $a->start();
>
> /* problem: only get here if they've logged in on THIS server */
>
> Elijah
> ------
> has solved this problem before in PHP using encrypt info in cookies
That's because cookies are only sent to the originating domain for
security reasons.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|