Horde Setup:Session does not work.
Ichinichi Ichizen
ichizen at yahoo.co.jp
Fri Nov 16 01:22:28 PST 2001
i have a problem setting up horde for imp.
i'd appreciate any help.
i have installed and set up horde, but clicking on 'Click here to test
PHPLIB for Horde' of test.php3 shows 'Document contains no data' error.
i'm on windows 2000.
below is the steps i did.
install apache(1.3.22)
install php(4.0.6)
configure apache to work with php
test php->http://localhost/test/phptest.php
<phptest.php>
---------------------------------------------------------------------------
<html>
<head>
<title>Example</title>
</head>
<body>
<?php echo "Hi, I'm a PHP script!"; ?>
</body>
</html>
---------------------------------------------------------------------------
install mysql(3.23.39)
install horde(1.2.7)
configure horde, php, phplib, mysql to work together
test horde->http://localhost/horde/test.php3
everything is fine except for phplib session.
output displays:
---------------------------------------------------------------------------
PHPLIB Configuration
track_vars: Yes
PHPLIB (is page_open() defined): Yes
I am now going to try to create a HordeSession class. If this line is the
last thing that you see, then you do not have class HordeSession defined
in the phplib local.inc file. Fix that before proceeding.
Created a HordeSession instance successfully.
Click here to test PHPLIB for Horde (If this link results in "Document
Contains No Data" or "Fatal error...", then you probably have not defined
the HordeSession class in the PHPLIB local.inc file).
---------------------------------------------------------------------------
i have already defined local.inc, but clicking on 'Click here to test
PHPLIB for Horde' shows 'Document contains no data' error.
so, i tested database privileges as below:
mysql -h localhost -u hordemgr -phordemgr horde
insert into active_sessions values('1','2','3','4');
select * from active_sessions;
update active_sessions set changed='5';
select * from active_sessions;
delete from active_sessions;
select * from active_sessions;
all is good. database privileges seem setup fine.
then, i tested database connection from phplib as below:
insert into active_sessions values('1','2','3','4');
http://localhost/test/dbtest.php
<dbtest.php>
---------------------------------------------------------------------------
<?php
include("table.inc");
$db = new HordeDB;
$db->query("select * from active_sessions");
$t = new Table;
$t->heading = "on";
$t->show_result($db);
?>
---------------------------------------------------------------------------
all is good. so database setting should be okay.
then, i tested phplib session as below:
http://localhost/test/sessiontest.php
<sessiontest.php>
---------------------------------------------------------------------------
<?php
page_open(array("sess" => "HordeSession"));
if (!isset($s)) {
$s=0;
$sess->register("s");
}
?>
<html>
<body>
<a href="<?php $sess->pself_url()?>">Reload</a> this page to see the
counters increment.<br>
Per Session Data: <?php echo ++$s ?><br>
Session ID: <?php echo $sess->id ?><br>
<p>If this page works correctly, then you have a correctly configured
HordeSession class. You should be done with PHPLIB setup.</p>
</body></html>
<?php
page_close()
?>
---------------------------------------------------------------------------
this raise 'Document contains no data' error.
session does not work.
below is my local.inc configuration
---------------------------------------------------------------------------
class HordeDB extends DB_Sql {
var $Host = 'localhost';
var $Database = 'horde';
var $User = 'hordemgr';
var $Password = 'hordemgr';
var $Port = '3306';
function halt($msg) {
// Printing here causes race condition trouble, so don't.
//printf("<b>Database error (HordeDB):</b> %s<br>\n", $msg);
}
}
class HordeCT extends CT_Sql {
var $database_class = 'HordeDB'; // Which database class to
use...
var $database_table = 'active_sessions'; // and find our data in this
table.
}
class HordeSession extends Session {
var $classname = 'HordeSession';
var $cookiename = ''; // defaults to classname
var $magic = 'chuckmIMP'; // ID seed
var $mode = 'cookie'; // We propagate session IDs with
cookies
var $fallback_mode = 'get';
var $lifetime = 0; // 0 = do session cookies, else
minutes
var $that_class = 'HordeCT'; // name of data storage container
var $gc_probability = 5;
var $allowcache = 'no'; // don't allow any caching of pages
}
class HordeSessionCached extends HordeSession {
var $allowcache = 'private'; // allow private caching of pages
}
does anyone have any idea??
Masaki
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
More information about the horde
mailing list