Problems with Mysql and imp/horde

root vittorio@dotalia.com
Fri, 14 Sep 2001 12:09:06 +0200


I configured php 4.06. (with the last pear ..)
Mysql as described in the documentations.

this is the horde.conf file :

/**
 ** Horde Authentication
 **/

// Which users should be treated as administrators (root, super-user)
// by Horde?
$conf['auth']['admins'] = array();

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

// An array holding any parameters that the Auth object will need to
// function correctly. For IMAP, this is the server name, port,
// protocol, etc.
$conf['auth']['params'] = array();
$conf['auth']['params']['phptype'] = 'imap';
$conf['auth']['params']['hostspec'] = 'xxx.xxx.xxx.xxx';
$conf['auth']['params']['port'] = '143';


/**
 ** Preference System Settings
 **/

// 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();
$conf['prefs']['params']['phptype'] = 'mysql';
$conf['prefs']['params']['protocol'] = 'unix';
$conf['auth']['params']['hostspec'] = 'localhost';
$conf['auth']['params']['username'] = 'hordemgr';
$conf['auth']['params']['password'] = 'xxxxxx';
$conf['auth']['params']['database'] = 'horde';
$conf['auth']['params']['table'] = 'horde_prefs';



and here is phplib/local.inc
/* 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 = 'xxxxxxxx';
  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.
}

Heare is phplib/db_mysql.inc:

class DB_Sql {
  
  /* public: connection parameters */
  var $Host     = "localhost";
  var $Database = "horde";
  var $User     = "hordemgr";
  var $Password = "xxxxxxx";

  /* public: configuration parameters */
  var $Auto_Free     = 0;     ## Set to 1 for automatic
mysql_free_result()
  var $Debug         = 0;     ## Set to 1 for debugging messages.
  var $Halt_On_Error = "yes"; ## "yes" (halt with message), "no" (ignore
errors quietly), "report" (ignore errror, but spit a warning)
  var $Seq_Table     = "db_sequence";

....

and finaly the prepend.php3
<?php
/*
 * Session Management for PHP3
 *
 * Copyright (c) 1998,1999 SH Online Dienst GmbH
 *                    Boris Erdmann, Kristian Koehntopp
 *
 * $Id: prepend.php3,v 1.1.2.5 2001/07/16 17:06:26 chuck Exp $
 *
 */ 

$_PHPLIB['libdir'] = '';

require($_PHPLIB["libdir"] . "db_mysql.inc");  /* Change this to match
your database. */
require($_PHPLIB["libdir"] . "ct_sql.inc");    /* Change this to match
your data storage container */
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 configuration. */
require($_PHPLIB["libdir"] . "page.inc");      /* Required, contains the
page management functions. */

?>
Result of th test.php
Horde Versions

       Horde: 1.3.5-cvs 
       IMP: 2.3.7-cvs 
       Turba: 0.0.3-cvs 
       Gollem: 0.0.1-cvs 
       Kronolith: 0.0.3-cvs 
       Chora: 0.6.5-cvs 
       Whups: 0.0.1-cvs 

 PHP Version

       View phpinfo() screen 
       PHP Version: 4.0.8-dev 
       PHP Major Version: 4.0 
       PHP Minor Version: 8 
       PHP Version Classification: dev 
       You are running a supported version of PHP.

 PHP Module Capabilities

       FTP Support: Yes 
       Gettext Support: Yes 
       IMAP Support: Yes 
       LDAP Support: Yes 
       MCAL Support: Yes 
       Mcrypt Support: Yes 
       MySQL Support: Yes 
       PostgreSQL Support: Yes 
       XML Support: Yes 

 Miscellaneous PHP Settings

       magic_quotes_runtime set to Off: Yes 

 PHP Sessions

       Session counter: 1 
       To unregister the session: click here 

 PEAR

       PEAR - Yes 
       Mail::RFC822 - Yes 
       Log - Yes 
       DB - Yes 

                  

I work fine with imp, but NOTHING go to the database, so I cannot save
preference, seem that all goes fine, but if you enter again to view your
preference you loose it.

There are no data on all the horde tables. So I check with phpMyAdmin if
there are problem with php, but I was able to  write everithing on the
database.

Finaly I check the grant privilege that the user MySQL own and there all
all ok.

Now I don't know what I can do more, please could you help me ??

Thanks
vittorio manfredini