[TriLUG] IMP - enabling preferences using Postgres as DB?

Jeremy P jeremyp at pobox.com
Mon Mar 4 13:00:39 EST 2002


On Mon, 4 Mar 2002 jonc at haht.com wrote:

> Well I installed IMP last week, and it took me darn near 36 hours to get it 
> up and running/secure/configured.  
> 
> A major part of the problem is that the docs are very sparse and depending 
> on who wrote the section, they are oriented either to MySql or PostgresSQL, 
> but not to both...
> 
> I know some folks on here have setup IMP and have it working... So unto 
> ya'll I say: Help!
>
> I'm having a problem storing user preferences.  I currently have 
> it set to none, because it barfs when I try to use 'sql'.

I agree that IMP is *extremely* difficult to configure.  It also took me a
lot of time to get it working.  I use MySQL but the configuration should
be similar, really.

Here's a couple of tips:  Make sure you're really using the correct
version of PHP and PEAR (the PHP module library).   PEAR might be
installed in multiple places on your system; your PHP might be using a
different location than you think.    Due to crazy depedencies, I had to
upgrade my system to RHL 7.2 to get everything correct for PHP (otherwise
I would have been rebuidling 20+ packages!)

Also, try adding a "dsn" parameter to the prefs array like this:
$conf['prefs']['params']['dsn'] = 'mysql://horde:*******@localhost/horde';

This encodes all of the database connection info into one variable, but
you need to leave the config as separate variables, too.  Apparently,
various parts of PEAR prefer that legacy setup with everything in the
"dsn" variable, and other parts like the separate variables.

In the dsn variable, replace the *'s with your actual password, and mysql
with pgsql.  The first "horde" (before the *'s) is the database username;
localhost is the database host, and the final "horde" is the database
name.

I found that little trick (the dsn variable) after hours of laboring
through obscure Google results, and reading the Horde and PEAR source
code.  I'm not sure if it's the "correct" fix but it seemed to work for
me.

--Jeremy





More information about the TriLUG mailing list