[horde] Auth:: strange problem

Stain stain at dxml.org
Fri Dec 20 01:58:26 PST 2002


building my first own application based on horde, i've find out a problem with 
authentication.

as chora and gollem, my index page is something like:

---------------------------------------------
define('MY_BASE', dirname(__FILE__));
@include_once MY_BASE . '/lib/base.php';
header('Location: ' . My::url(MY_PAGE_START, 
array('path'=>My::getUserBase())));
---------------------------------------------

"My" is a temporary name. ;-)

my lib/base.php defines some costants, include several classes and, at the 
end, starts authentication:

---------------------------------------------
@define('HORDE_BASE', dirname(__FILE__) . '/../../horde');
@define('MY_BASE', dirname(__FILE__) . '/..');

require_once MY_BASE . '/lib/My.php';
require_once MY_BASE . '/lib/Rsync.php';
require_once HORDE_BASE . '/lib/Horde.php';
require_once HORDE_BASE . '/lib/Auth.php';
require_once HORDE_BASE . '/lib/Text.php';
require_once HORDE_BASE . '/lib/Registry.php';
require_once HORDE_BASE . '/config/horde.php';
require_once HORDE_BASE . '/config/lang.php';
require_once MY_BASE . '/config/my.php';

# [snip]

$registry = &Registry::singleton();
$registry->pushApp('my');
$conf = &$GLOBALS['conf'];
@define('MY_TEMPLATES', $registry->getParam('templates'));

# [snip]

if (!Auth::getAuth() && !$registry->allowGuests()) {
    header('Location: ' . Horde::url($registry->getParam('webroot', 'horde') . 
'/login.php?url=' . urlencode(Horde::selfUrl()), true, false));
    exit;
}
---------------------------------------------

problem is that, when i start with my index page, i get through horde 
authentication. then i come back to my index page with horde session_id. then 
my index page takes me to another page by header() function, but that page 
still asks for authentication (since lib/base.php is in it) and brings me 
another time to horde login page. after a second login, horde change my 
session_id and takes me to my start page correctly.

well, i can't understand while when having just authenticate, the second page 
asks for another authentication.

i suppose sessions are not correctly working or something like.

i also have my app dir at the same level of horde, but i still gets errors 
when i move my app inside horde dir...

so, any hint?

thank you

bye, stain.

-- 
"If there is any, error is human"


More information about the horde mailing list