Summary | H4: Userlist empty (in admin gui) |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | No Feedback |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | hutter (at) ihs (dot) ac (dot) at |
Created | 08/24/2010 (5444 days ago) |
Due | |
Updated | 07/01/2011 (5133 days ago) |
Assigned | 09/23/2010 (5414 days ago) |
Resolved | 07/01/2011 (5133 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
I have the same problem after a "git pull". It happens after login, I
get a page with tis message :
PHP Catchable fatal error: Argument 1 passed to
Horde_Ldap_Filter::build() must be an array, null given, called in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php on line
864 and defined in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap/Filter.php
on line 274
An idea please ?
Best regards
Gerard
horde/conf/conf.php.dist to conf.php), just to make sure there is
nothing messed up, ut got the error again.
The comment above the function findUserDN says:
'This method requires the 'user' configuration parameter to be set.'
What is meant with this? Where should I find this configuration
parameter? grepping my conf.xml I couldn't find a parameter 'user' nor
does 'grep config conf.xml | grep user' or 'grep "name=\"user\""
conf.xml find anyting which seems to be useful.
New Attachment: login.php-backtrace.zip
var_dump(debug_backtrace());
statement on line 864 of
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php
(right about the build() call) and post (or better upload) the
output here.
$filter = Horde_Ldap_Filter::combine(
'and',
array(Horde_Ldap_Filter::build($this->_config['user']),
Horde_Ldap_Filter::create($this->_config['user']['uid'], 'equals',
$user)));
Putting var_dump between 'and' and 'array' breaks the syntax
(uexpected ';'). I placed it immediately before 'filter'.
Attached an obfuscated (usernames, pw's, servernames..) backtrace.
var_dump(debug_backtrace());
statement on line 864 of
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php (right
about the build() call) and post (or better upload) the output here.
configuration in auth and groups). Still can't reproduce it though.
Can you post a backtrace from the place where the error is raised?
When I log in as admin I get an empty page, the error is from the
apache log, there is nothing in the horde log.
configuration in auth and groups). Still can't reproduce it though.
Can you post a backtrace from the place where the error is raised?
$conf['ldap']['hostspec'] = 'DC1.subdomain.ihs.ac.at DC2.subdomain.ihs.ac.at';
$conf['ldap']['tls'] = false;
$conf['ldap']['version'] = 3;
$conf['ldap']['binddn'] = 'binduser';
$conf['ldap']['bindpw'] = 'bindpassword';
$conf['ldap']['bindas'] = 'admin';
$conf['ldap']['useldap'] = true;
$conf['auth']['admins'] = array('adm1', 'adm2', 'adm3', 'adm4');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['list_users'] = 'list';
$conf['auth']['params']['hostspec'] = 'DC1.subdomain.ihs.ac.at
DC2.subdomain.ihs.ac.at';
$conf['auth']['params']['tls'] = false;
$conf['auth']['params']['version'] = 3;
$conf['auth']['params']['binddn'] = 'binduser';
$conf['auth']['params']['bindpw'] = 'bindpassword';
$conf['auth']['params']['bindas'] = 'admin';
$conf['auth']['params']['basedn'] = 'ou=xyz,dc=subdomain,dc=ihs,dc=ac,dc=at';
$conf['auth']['params']['scope'] = 'sub';
$conf['auth']['params']['ad'] = true;
$conf['auth']['params']['uid'] = 'sAMAccountName';
$conf['auth']['params']['encryption'] = 'ssha';
$conf['auth']['params']['newuser_objectclass'] =
array('shadowAccount', 'inetOrgPerson');
$conf['auth']['params']['filter'] =
'(&(&(objectclass=user)(!(objectclass=computer))))';
$conf['auth']['params']['password_expiration'] = 'no';
$conf['auth']['params']['driverconfig'] = 'custom';
$conf['auth']['driver'] = 'ldap';
$conf['group']['params']['hostspec'] = 'DC1.subdomain.ihs.ac.at
DC2.subdomain.ihs.ac.at';
$conf['group']['params']['tls'] = false;
$conf['group']['params']['version'] = 3;
$conf['group']['params']['binddn'] = 'binduser';
$conf['group']['params']['bindpw'] = 'bindpassword';
$conf['group']['params']['bindas'] = 'admin';
$conf['group']['params']['basedn'] =
'ou=ABC,ou=XYZ,dc=subdomain,dc=ihs,dc=ac,dc=at';
$conf['group']['params']['scope'] = 'sub';
$conf['group']['params']['gid'] = 'cn';
$conf['group']['params']['memberuid'] = 'memberUid';
$conf['group']['params']['attrisdn'] = false;
$conf['group']['params']['newgroup_objectclass'] = array('posixGroup',
'hordeGroup');
$conf['group']['params']['search']['filter'] =
'(&(&(objectclass=group)(objectclass=top)))';
$conf['group']['params']['search']['filter_type'] = 'filter';
$conf['group']['params']['driverconfig'] = 'custom';
$conf['group']['driver'] = 'ldap';
$conf['group']['cache'] = false;
State ⇒ Feedback
The I reconfigured all the staff in the horde configuration.
After selecting Generate Configuration I'm thrown out because I'm not
an administrator (this is ok).
Logging in again I get an empty page again with the following error in
the apache log:
PHP Catchable fatal error: Argument 1 passed to
Horde_Ldap_Filter::build() must be an array, null given, called in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php on line
864 and defined in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap/Filter.php
on line 274, referer: http://caltest2.ihs.ac.at/horde/login.php
My filter settings in the conf.php are:
$conf['auth']['params']['filter'] =
'(&(&(objectclass=user)(!(objectclass=computer))))';
$conf['group']['params']['search']['filter'] =
'(&(&(objectclass=group)(objectclass=top)))';
$conf['group']['params']['search']['filter_type'] = 'filter';
These settings worked before the git pull.
Harald
install_dev today, I get the following error in the apache log:
PHP Catchable fatal error: Argument 1 passed to
Horde_Ldap_Filter::build() must be an array, null given, called in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php on line
864 and defined in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap/Filter.php
on line 274, referer: http://myserver.domain/horde/login.php
In the browser I have only an empty page.
Assigned to Jan Schneider
State ⇒ Resolved
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ H4: Userlist empty (in admin gui)
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
New Attachment: Ldap.php.diff
State ⇒ Unconfirmed
horde), we get only an empty list (icons are visible but no username is
shown).
I tracked this problem down in the code and it seems to be the following line
in function listUsers in framework/Auth/lib/Horde/Auth/Ldap.php
$uid = Horde_String::lower($this->_params['uid']);
See the attachment for a fix/workaround (diff -u output).
I assume the problem is, that a Ldap query is not case sensitive.
However, the result returned from our Windows 2008 Active Directory server
has the attribute sAMAccountName. By only converting the parameter uid
(which holds sAMAccountName) to lowercase, but not the returned result too,
the line "$userlist[] = $val[$uid][0];" will fail. If conversion to lowercase
is needed for other (real) ldap implementations, ensuring to convert the
returned attributes too, will be necessary for AD to work.
The disadvantage of the provided solution is one must enter
sAMAccountName in the config, thus having a case sensitive
configuration entry.
best,
Harald Hutter