[sork] Notice: Undefined index: socket in
/usr/local/php/lib/php/DB/mysql.php
Alexander Skwar
lists.ASkwar at email-server.info
Tue Apr 15 21:45:44 PDT 2003
Hi!
When I change my password with the SQL backend, I get this error message:
Notice: Undefined index: socket in /usr/local/php/lib/php/DB/mysql.php
on line 108
The attached patch fixes this. In the SQL backend, it now allows all
the supported keys of PEAR's DB.php.
Alexander Skwar
--
/* Am I fucking pedantic or what? */
2.2.16 /usr/src/linux/drivers/scsi/qlogicpti.h
-------------- next part --------------
diff -ur passwd.orig/config/backends.php.dist passwd.modified/config/backends.php.dist
--- passwd.orig/config/backends.php.dist 2003-04-15 20:34:52.000000000 +0200
+++ passwd.modified/config/backends.php.dist 2003-04-15 20:37:18.000000000 +0200
@@ -147,11 +147,15 @@
'driver' => 'sql',
'params' => array(
'phptype' => 'mysql',
- 'hostspec' => 'localhost',
+ 'dbsyntax' => false,
'username' => 'horde',
'password' => '',
- 'encryption' => 'md5-hex',
+ 'protocol' => 'tcp',
+ 'hostspec' => 'localhost',
+ 'port' => false,
+ 'socket' => false,
'database' => 'horde',
+ 'encryption' => 'md5-hex',
'table' => 'horde_users',
'user_col' => 'user_uid',
'pass_col' => 'user_pass'
Only in passwd.modified/config: backends.php.dist~
diff -ur passwd.orig/lib/Driver/sql.php passwd.modified/lib/Driver/sql.php
--- passwd.orig/lib/Driver/sql.php 2003-04-15 20:33:31.000000000 +0200
+++ passwd.modified/lib/Driver/sql.php 2003-04-15 20:35:22.000000000 +0200
@@ -39,11 +39,10 @@
/* Use defaults from Horde */
$defaults = Horde::getDriverConfig('', 'sql');
- $this->_params['hostspec'] = array_key_exists('hostspec', $params) ? $params['hostspec'] : $defaults['hostspec'];
- $this->_params['protocol'] = array_key_exists('protocol', $params) ? $params['protocol'] : $defaults['protocol'];
- $this->_params['username'] = array_key_exists('username', $params) ? $params['username'] : $defaults['username'];
- $this->_params['password'] = array_key_exists('password', $params) ? $params['password'] : $defaults['password'];
- $this->_params['database'] = array_key_exists('database', $params) ? $params['database'] : $defaults['database'];
+ $keys = array('dbsyntax', 'username', 'password', 'protocol', 'hostspec', 'port', 'socket', 'database');
+ foreach ($keys as $key){
+ $this->_params[$key] = array_key_exists($key, $params) ? $params[$key] : $defaults[$key];
+ }
/* Defaults to match Auth::sql default */
$this->_params['table'] = array_key_exists('table', $params) ? $params['table'] : 'horde_users';
More information about the sork
mailing list