Summary | LDAP driver for Portal Block account info do not work |
Queue | Horde Base |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | Klaus.Steinberger (at) physik (dot) uni-muenchen (dot) de |
Created | 04/01/2011 (5216 days ago) |
Due | |
Updated | 04/26/2011 (5191 days ago) |
Assigned | |
Resolved | 04/14/2011 (5203 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Fix shadowlastchange calculation (
Bug #9770).2 files changed, 3 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/7c5b7fc12ec223b2685adcf47059626e4a304551
Refactor LDAP driver to user Horde_Ldap (
Bug #9770).1 files changed, 74 insertions(+), 151 deletions(-)
http://git.horde.org/horde-git/-/commit/2bb5eb64a50c270fe0f7d9fce688af14a4c7ed96
return 01/01/1970 because it miss '* 86400'
Here solution:
--- Ldap.php.orig 2011-04-26 12:17:18.000000000 +0200
+++ Ldap.php 2011-04-26 13:27:43.000000000 +0200
@@ -175,7 +175,7 @@
{
$information = $this->_getAccount();
try {
- return strftime('%x',
$information->getValue('shadowlastchange', 'single'));
+ return strftime('%x',
$information->getValue('shadowlastchange', 'single') * 86400);
} catch (Horde_Ldap_Exception $e) {
}
try {
Regards,
Marco
changes after this one.
Refactor LDAP driver to user Horde_Ldap (
Bug #9770).1 files changed, 74 insertions(+), 151 deletions(-)
http://git.horde.org/horde-git/-/commit/2bb5eb64a50c270fe0f7d9fce688af14a4c7ed96
I've tried the changes but got:
[Tue Apr 19 15:55:48 2011] [error] [client 141.84.12.60] PHP Fatal
error: Class 'Horde_Block_Account_Ldap' not found in
/var/www/html/horde/lib/Block/Account.php on line 57, referer:
http://dmz-sv-webmail.physik.uni-muenchen.de/horde/admin/config/index.php
Sincerly,
Klaus
Refactor LDAP driver to user Horde_Ldap (
Bug #9770).1 files changed, 74 insertions(+), 151 deletions(-)
http://git.horde.org/horde-git/-/commit/2bb5eb64a50c270fe0f7d9fce688af14a4c7ed96
in horde/lib/Block/Account.php line 445 "host" ist used as parameter,
but the new config structure uses "hostspec"
// Connect to the LDAP server.
$this->_ds = ldap_connect($this->_params['host'],
$this->_params['port']);
this is easy to change, but also the defaults are not taken correctly:
in the function Accounts_Driver_ldap($params = array())
there is also host referenced instead of hostspec. I have changed
both, but the horde default config is not used, so maybe the array
merging is done incorrectly?
Version ⇒ Git master
State ⇒ Resolved
[jan] Fix LDAP parameters of account portal block (Klaus Steinberger,
Bug #9770).3 files changed, 15 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/a145d8735d1142c78ca4e623ea822e3b283134df
New Attachment: conf.xml.diff
The "configsection" is missing around the Account Block LDAP driver.
Appended is a patch
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ LDAP driver for Portal Block account info do not work
Type ⇒ Bug
Apr 1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR:
Undefined index: params [pid 9310 on line 46 of
"/var/www/html/horde/lib/Block/Account.php"]
Apr 1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR:
array_merge(): Argument
#2is not an array [pid 9310 on line 443 of"/var/www/html/horde/lib/Block/Account.php"]
Apr 1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR:
ldap_search(): Search: Bad search filter [pid 9310 on line 548 of
"/var/www/html/horde/lib/Block/Account.php"]
Apr 1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR:
ldap_first_entry() expects parameter 2 to be resource, boolean given
[pid 9310 on line 549 of "/var/www/html/horde/lib/Block/Account.php"]
Apr 1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR:
ldap_get_entries() expects parameter 2 to be resource, boolean given
[pid 9310 on line 550 of "/var/www/html/horde/lib/Block/Account.php"]
The reason is a mismatch between conf.php file an the code:
The code assumes parameters for LDAP in ['accounts']['params'] but the
configuration looks like this:
$conf['accounts']['basedn'] = 'ou=Personen,o=physik';
$conf['accounts']['scope'] = 'sub';
$conf['accounts']['attr'] = 'cn';
$conf['accounts']['strip'] = false;
$conf['accounts']['driverconfig'] = 'horde';
$conf['accounts']['driver'] = 'ldap';
$