Imp: not accessing MySql database

Michael Beddow mbnospam@mbeddow.net
Wed, 15 Aug 2001 13:50:27 +0100


Hi all.

I have a working Apache/PHP 4/MySql setup on RH Linux 7.1 and I'm trying
to add Horde-1.2.6/Imp-2.2.6 in to it, installing from the tarballs.

Everything went a lot smoother that some postings here led me to expect,
and all the functionality is there, apart from one problem I haven't
been able to fix. Imp doesn't appear to be seeing or using the MySql
database. I'm not seeing a "Contacts" button, and though user
preferences are being persisted, I think that's happening via Cookies.

I used the supplied script to create the horde database, and verified
from the mysql command prompt that the database has been created and
contains the right tables. I also checked that user hordemgr with
password hordemgr has access to the horde database and the tables and
can perform queries on them. But there is no data in the imp_pref table
even for users who have persistent preferences.

In phplib/local.inc, I uncommented these lines:

/* To use an SQL database, uncomment and edit the following: */
class HordeDB extends DB_Sql {
  var $Host = 'localhost';
  var $Database = 'horde';
  var $User = 'hordemgr';
  var $Password = 'hordemgr';
  var $Port = '';
}

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.
}

I tried adding the port on which mysql listens (3306), but that had no
effect, so I removed it again.


phplib/prepend.php3 reads

$_PHPLIB['libdir'] = '';

require($_PHPLIB["libdir"] . "db_mysql.inc");  /* Change this to match
your datab
require($_PHPLIB["libdir"] . "ct_sql.inc");    /* Change this to match
your data
require($_PHPLIB["libdir"] . "session.inc");   /* Required for
everything below.

/* Additional require statements go below this line */
/* Additional require statements go before this line */

require($_PHPLIB["libdir"] . "local.inc");     /* Required, contains
your local c
require($_PHPLIB["libdir"] . "page.inc");      /* Required, contains the
page man


and in httpd.conf I have:

 <Directory /var/www/html/horde>
      Options Indexes FollowSymLinks
      AllowOverride None
      order allow,deny
      allow from all
      <IfModule mod_php3.c>
          php3_include_path "/var/www/html/horde/phplib:."
          php3_auto_prepend_file /var/www/html/horde/phplib/prepend.php3
          php3_magic_quotes_gpc Off
          php3_track_vars On
      </IfModule>
      <IfModule mod_php4.c>
          php_value include_path "/var/www/html/horde/phplib:."
          php_value auto_prepend_file
/var/www/html/horde/phplib/prepend.php
          php_flag register_globals On
          php_flag magic_quotes_gpc Off
          php_flag track_vars On
      </IfModule>

I have verified (by temporarily introducing deliberate syntax errors)
that php is accessing my local.inc and prepend.php3 files.

But now I've run out of ideas. Any suggestions, anyone?
---------------------------------------------------------
Michael Beddow   http://www.mbeddow.net/
XML and the Humanities page:  http://xml.lexilog.org.uk/
---------------------------------------------------------