PEAR Auth package woes [message #178375] |
Tue, 12 June 2012 00:32 |
Eli the Bearded
Messages: 22 Registered: April 2011
Karma:
|
Junior Member |
|
|
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
|
|
|