Closed (fixed)
Project:
LDAP integration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Mar 2009 at 04:34 UTC
Updated:
4 May 2009 at 21:29 UTC
If I enable "Group by attribute," I get these errors:
warning: Illegal offset type in isset or empty in /var/www/drupal/sites/default/modules/ldap_integration/ldapgroups.module on line 300.
warning: preg_match() expects parameter 2 to be string, array given in /var/www/drupal/sites/default/modules/ldap_integration/ldapgroups.module on line 302.Wireshark doesn't show any instance where a searchRequest is done on just the memberOf attribute of the user's directory entry, so I presume you're pulling the memberOf data from one of the searchRequests that returns all 87 attributes on my user's directory entry.
I am using Active Directory.
Comments
Comment #1
aren cambre commentedI just noticed that one role did get created in Drupal. Strangely, the role's name was the group's DN instead of CN. (See #417900: Role names are truncated DNs instead of CNs.)
However, the role's name was so long that it got truncated at 64 characters. Are Drupal role names limited to 64 chars? Does this help explain the error?
Comment #2
miglius commentedFirst, do you use "PHP to filter roles by:" filter in the ldapgroups configuration? One should be extremely caution with this php code.
There is a "Mapping of LDAP groups to Drupal roles:" settings exactly for tis purpose - to change a group's full DN to a friendly role name. Do you use it?
Comment #3
aren cambre commentedI left "PHP to filter roles by:" blank.
"Use LDAP group to Drupal roles filtering" is unchecked. Below, its description says if it's not checked, "a Drupal role will be created for every group the user is associated with." So should I be seeing a Drupal role corresponding to each group to which a user is a member?
Comment #4
kaw3939 commentedI'm getting this error when I have group by attribute turned on i'm using the latest 6.x-1.x-dev mar 30 dev release. Here is what it is outputing:
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /afs/cad.njit.edu/web/learningspaces/carbon/includes/database.mysqli.inc on line 323.
warning: Illegal offset type in isset or empty in /afs/cad.njit.edu/web/learningspaces/carbon/sites/all/modules/ldap_integration/ldapgroups.module on line 296.
warning: preg_match() expects parameter 2 to be string, array given in /afs/cad.njit.edu/web/learningspaces/carbon/sites/all/modules/ldap_integration/ldapgroups.module on line 298.
warning: Illegal offset type in isset or empty in /afs/cad.njit.edu/web/learningspaces/carbon/sites/all/modules/ldap_integration/ldapgroups.module on line 296.
warning: preg_match() expects parameter 2 to be string, array given in /afs/cad.njit.edu/web/learningspaces/carbon/sites/all/modules/ldap_integration/ldapgroups.module on line 298.
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /afs/cad.njit.edu/web/learningspaces/carbon/includes/database.mysqli.inc on line 323.
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /afs/cad.njit.edu/web/learningspaces/carbon/includes/database.mysqli.inc on line 323.
Comment #5
aren cambre commentedKeith: are you using Active Directory?
Comment #6
bnice5000 commentedI am getting a similar error:
* warning: Illegal offset type in isset or empty in /web/six/sites/all/modules/ldap_integration/ldapgroups.module on line 296.
* warning: preg_match() expects parameter 2 to be string, array given in /web/six/sites/all/modules/ldap_integration/ldapgroups.module on line 298.
This is on our test box and the only module installed is the the ldap module version 6.x-1.x-dev from March 30th . It is Drupal 6.10 on Ubuntu 8.04.2 Server using the standard AMP set-up. It is querying OpenLDAP 2.3.39 a field that is multi-value attribute field. If I can give any more information or try anything to test this out let me know as I am very interested in helping make the ldap module for drupal 6 ready for production.
--Brian
Comment #7
aren cambre commentedI just noticed that on second and later logins, I get an additional error.
Here are all three, with the "additional" error being the last one starting with user warning: Duplicate entry:
(I intentionally x-ed out some details above.)
The third error tells me that whatever logic you're using to verify whether a role already exists is working differently than the logic to create the role name. Otherwise it wouldn't try to duplicate the role.
Comment #8
kaw3939 commentedNo i'm not using active directory.
I have a fresh install of ldap module (current dev) and it is giving errors on login. I have a working ldap module on other sites using same server on same drupal multisite install but not with dev module.
Comment #9
miglius commentedI believe this is fixed now, see #429186: unable to map AD Group to Role with Filtering, looking for support help..
Comment #10
aren cambre commentedThank you. Let us know when a new dev release is rolled out (in #376974: Next release is fine), and I'll check it out.
Comment #12
kaw3939 commentedthanks. I'll test it out