other files using horde/imp login mechanism outside of tree
Zachary Denison
zacharydenison@yahoo.com
Thu, 24 Jan 2002 06:55:03 -0800 (PST)
Hi,
I am trying to make my own pages that use the horde
login mechanism (which is itself configured to use the
IMP login mechanism). When I create this simple
hello.php file inside the main horde directory, it
works fine, as you would expect. What I would like to
do, is have php files outside the horde directory use
the horde login infrastructure. So as a test I placed
this hello.php one level up from the horde directory,
and I modified HORDE_BASE accordingly by appending a
/horde to it. For some reason now, it authenticates
properly but cannot find the hello.php page to
redirect to. Does anyone know why this might be. I
would like to create many directories and
subdirectories on my site, and have all the php files
use the horde / imp login mechanism site wide.
I should also let you know I have the php include_path
set to the current directory, the horde directory, the
imp directory, and both lib directories.
Thank you,
Zachary
<?
// this file is hello.php
define('HORDE_BASE', dirname(__FILE__) . "/horde/");
require_once(HORDE_BASE . '/lib/base.php');
$user=Auth::getAuth();
if($user){
print "Hello $user";
} else {
header( 'Location: ' .
Horde::applicationUrl("login.php?url=hello.php", true)
);
exit;
}
?>
__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com