[horde] How to create a useracount

Etienne Goyer etienne.goyer at linuxquebec.com
Thu Sep 11 06:01:24 PDT 2003


Hi Chrigi,

On Thu, Sep 11, 2003 at 01:07:54PM +0200, Chrigi Hartmann wrote:
> Hi Etienne
> 
> > > Required 'phptype' not specified in authentication configuration.
> > >
> > > [line 97 of /inetpub/www/html/horde/lib/Auth/sql.php]
> > >
> > > Details have been logged for the administrator.
> >
> > Look in horde/config/conf.php (or horde.php, depend on version) and make
> > sure you have a line similar to :
> >
> > $conf['sql']['phptype'] = 'mysql';
> 
> In /pathtohtmldir/horde/config/horde.php i have this:
> 
> *********************************************************************
> // What preferences driver should we use? Valid values are 'none'
> // (meaning use system defaults and don't save any user preferences),
> // 'session' (preferences only persist during the login), 'ldap',
> // and 'sql'.
> $conf['prefs']['driver'] = 'sql';
> 
> // Any parameters that the preferences driver needs. This includes
> // database or ldap server, username/password to connect with, etc.
> $conf['prefs']['params'] = array();
> 
> // This is an example configuration for a MySQL preference backend.
> // The SQL script to setup the preference database is placed in
> // horde/scripts/db/prefs.sql.
> $conf['prefs']['params']['phptype'] = 'mysql';
> $conf['prefs']['params']['hostspec'] = 'localhost';
> $conf['prefs']['params']['username'] = 'horde';
> $conf['prefs']['params']['password'] = 'horde';
> $conf['prefs']['params']['database'] = 'horde';
> $conf['prefs']['params']['table'] = 'horde_prefs';
> *********************************************************************

That's your problem.  You defined a preferences backend, not an
authentication backend.  You need to edit the following section of your
horde.php :

---
/**
 ** Horde Authentication
 **/

// If you want to use IMP with Horde and don't want to let the users
// login twice (once for Horde and once for IMP) you can setup Horde
// to let IMP do the authentication stuff. Just uncomment the
// auth/login/logout lines in registry.php instead of configuring the
// following settings.

// What backend should we use for authenticating users to Horde? Valid
// options are currently 'imap', 'ldap', 'mcal', 'sql', 'ftp', 'smb',
// 'krb5' and 'radius'.
$conf['auth']['driver'] = 'sql';

// An array holding any parameters that the Auth object will need to
// function correctly.
$conf['auth']['params'] = array();
---

>From there on, you need to populate $conf['auth']['params'] with
something similar to what you did for the prefs backend :

--- 
$conf['auth']['params']['phptype'] = 'mysql';
$conf['auth']['params']['hostspec'] = 'localhost';
$conf['auth']['params']['username'] = 'horde';
$conf['auth']['params']['password'] = 'horde';
$conf['auth']['params']['database'] = 'horde';
// This will need to be verified
$conf['auth']['params']['table'] = 'horde_auth'; 
---

Don't forget
to create the table with the script provided in the scripts/ directory
of your installation.

> > What do
> > you have configured as include_path in /etc/php.ini ?
> 
> Nothing! i comment this in my php.ini. should i have to set a path here?

If it currently work, don't touch it.  In my case, I leaved the
distribution-provided PEAR in it's place, and install the PEAR tarball
from Horde in /usr/local/share.  Thus I edited the include_path of PHP
to have my /usr/local/share/pear searched first.  You don't have to do
that, I think.

Salutations,

-- 
Etienne Goyer                    Linux Québec Technologies Inc.
http://www.LinuxQuebec.com       etienne.goyer at linuxquebec.com



More information about the horde mailing list