Thursday, March 12, 2009

How to make Horde3 to start in Administrator mode?

I have had this problem before - don't know why - but this is what I
did to get around it.

You need to run the database define stream that is appropriate for
you DB backend
/horde/scripts/sql/create.whateverdbyouhave

P.S.: I solved with database by running horde/scripts/setup.php

Then insert the default horde sql definition in conf.php

$conf['use_ssl'] = 2;

$conf['server']['name'] = $_SERVER['SERVER_NAME'];

$conf['server']['port'] = $_SERVER['SERVER_PORT'];

$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];

$conf['cookie']['path'] = '/horde';

$conf['debug_level'] = E_ALL & ~E_NOTICE;
$conf['umask'] = 077;
$conf['compress_pages'] = true;
$conf['session']['name'] = 'Horde';
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 0;
$conf['auth']['admins'] = array('Administrator');
$conf['auth']['driver'] = 'auto';
$conf['auth']['params'] = array('username' => 'Administrator');
$conf['prefs']['driver'] = 'session';
$conf['menu']['always'] = false;
$conf['portal']['fixed_blocks'] = array();
$conf['imsp']['enabled'] = false;
$conf['kolab']['enabled'] = false;

$conf['log']['priority'] = PEAR_LOG_NOTICE;
$conf['log']['ident'] = 'HORDE';
$conf['log']['params'] = array();
$conf['log']['name'] = '/var/log/horde/horde3.log';
$conf['log']['params']['append'] = true;
$conf['log']['type'] = 'file';
$conf['log']['enabled'] = true;
$conf['log_accesskeys'] = false;

$conf['sql']['persistent'] = true;
$conf['sql']['username'] = 'horde';
$conf['sql']['password'] = '1_hordeadmin';
$conf['sql']['protocol'] = 'unix';
$conf['sql']['database'] = 'horde';
$conf['sql']['charset'] = 'utf-8';
$conf['sql']['splitread'] = false;
$conf['sql']['phptype'] = 'mysql';

then insert the datatree def in conf.php
$conf['datatree']['params']['driverconfig'] = 'horde';
$conf['datatree']['driver'] = 'sql';

Now you can open the Horde3 in Administrator mode and configure it normaly (this mean you type http://localhost/horde3)

======
When try to logout I got this "This request cannot be completed because the link you followed or the form you submitted was only valid for minutes. Please try again now"

Solved (see this link):

There is a math bug in the horde/lib/Horde.php checkRequestToken, the
paranthesis are missing :

instead of

if ($_SESSION['horde_form_secrets'][$token] +
$GLOBALS['conf']['urls']['token_lifetime'] * 60 < time()) {
return PEAR::raiseError(sprintf(_("This request cannot be
completed because the link you followed or the form you submitted was
only valid for %s minutes"),
$GLOBALS['conf']['urls']['token_lifetime']));
}

it should be

if (($_SESSION['horde_form_secrets'][$token] +
$GLOBALS['conf']['urls']['token_lifetime']) * 60 < time()) {
return PEAR::raiseError(sprintf(_("This request cannot be
completed because the link you followed or the form you submitted was
only valid for %s minutes"),
$GLOBALS['conf']['urls']['token_lifetime']));
}

no matter which setting you chose for token_lifetime - it will always
complain about that the link is no longer valid.
===========
Note:

if you have such message when loging in "Warning: Invalid argument supplied for foreach() in /ingo/lib/Block/overview.php on line 50"
this mean you have not created the database for INGO plughin

To do so, go to "horde/ingo/scripts/sql" and from there run:

# mysql -uroot -p database_passwd horde < ingo.sql



Enjoy.

2 comments:

  1. Don't use the solution provided for the issue 'When try to logout I got this "This request cannot be completed because the link you followed or the form you submitted was only valid for minutes. Please try again now"', it is incorrect.

    Use the patch from the bug http://bugs.horde.org/ticket/7669

    ReplyDelete