[horde] how to make horde connects to mysql using TCP
Antoine Jacoutot
ajacoutot at lphp.org
Mon May 3 09:53:09 PDT 2004
On Monday 03 May 2004 17:11, Jan Schneider wrote:
> $conf['prefs']['params']['protocol'] = 'tcp';
>
> is missing.
Well, I though of it before... anyway it still does not work...
Beside, function _connect in /horde/lib/Prefs/sql.php doesn't say anything
about 'protocol':
function _connect()
{
if (!$this->_connected) {
if (!is_array($this->params)) {
Horde::fatal(new PEAR_Error(_("No configuration information
specified for SQL Preferences.")), __FILE__, __LINE__);
}
if (!isset($this->params['phptype'])) {
Horde::fatal(new PEAR_Error(_("Required 'phptype' not
specified in preferences configuration.")), __FILE__, __LINE__);
}
if (!isset($this->params['hostspec'])) {
Horde::fatal(new PEAR_Error(_("Required 'hostspec' not
specified in preferences configuration.")), __FILE__, __LINE__);
}
if (!isset($this->params['username'])) {
Horde::fatal(new PEAR_Error(_("Required 'username' not
specified in preferences configuration.")), __FILE__, __LINE__);
}
if (!isset($this->params['password'])) {
Horde::fatal(new PEAR_Error(_("Required 'password' not
specified in preferences configuration.")), __FILE__, __LINE__);
}
if (!isset($this->params['database'])) {
Horde::fatal(new PEAR_Error(_("Required 'database' not
specified in preferences configuration.")), __FILE__, __LINE__);
}
if (!isset($this->params['table'])) {
Horde::fatal(new PEAR_Error(_("Required 'table' not specified
in preferences configuration.")), __FILE__, __LINE__);
}
/* Connect to the SQL server using the supplied parameters. */
include_once 'DB.php';
$this->db = &DB::connect($this->params, true);
if (DB::isError($this->db)) {
Horde::fatal($this->db, __FILE__, __LINE__);
}
/* Enable the "portability" option. */
$this->db->setOption('optimize', 'portability');
$this->_connected = true;
}
return true;
}
More information about the horde
mailing list