LiveUser ... some problems
| From: | Alexander Flatter | Date: | Thu, 30 Dec 2004 08:19:17 +0000 |
| Subject: | LiveUser ... some problems | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16509@lists.php.net to get a copy of this message | ||
Hi ...
I have some problems with LiveUser. To learn more about this package,
I looked at some of the examples, but none matched with my settings.
I tried a simple example [1] and I'm not able to debug it. In case you
need a sql dump, there it is [2]. For users who read this mail later
in the archive: I used 'perm_db_simple.sql' and 'Auth_DB.sql' from the
LiveUser-Package. Output is [3]. Are you able to reproduce this error?
Is it my fault?
Thank you!
[1] code
<?php
/* Init ..... */
/* Required classes */
require_once('LiveUser/Admin.php');
$GLOBALS['_LIVEUSER_DEBUG'] = true;
$db = DB::connect($cfg['mysql']['dsn']);
if (PEAR::isError($db)) {
echo $db->getMessage() . ' ' . $db->getUserInfo();
die();
}
$conf =
array(
'autoInit' => false,
'session' => array(
'name' => 'PHPSESSION',
'varname' => 'ludata'
),
'login' => array(
'regenid' => true,
'force' => false
),
'logout' => array(
'destroy' => true
),
'authContainers' => array(
array(
'type' => 'DB',
'name' => 'DB_Local',
'loginTimeout' => 0,
'expireTime' => 3600,
'idleTime' => 1800,
'dsn' => $cfg['mysql']['dsn'],
'allowDuplicateHandles' => 1,
'authTable' => 'liveuser_users',
'authTableCols' => array(
'required' => array(
'auth_user_id' => array('type' => 'text', 'name' => 'auth_user_id'),
'handle' => array('type' => 'text', 'name' => 'handle'),
'passwd' => array('type' => 'text', 'name' => 'passwd'),
)
)
)
),
'permContainer' => array(
'type' => 'Simple',
'storage' => array(
'DB' => array(
'dsn' => $cfg['mysql']['dsn'],
'prefix' => 'liveuser_'
),
),
),
);
$admin =& LiveUser_Admin::factory($conf);
if ($admin == false) die(LiveUser::getErrors());
echo "Debug 1<br />\n";
var_dump($admin->setAdminContainers());
echo "Debug 2<br />\n";
$admin->addUser('User', 'Password');
?>
[2] http://aflatter.interdv.de/tmp/pear-general.LiveUser.sql
[3] Output
Debug 1
Warning: Illegal offset type in /var/www/aflatter/pear/PEAR/ErrorStack.php on line 915
bool(true)
Debug 2