Hi everyone, After update to 7.x-2.0-beta2 of Ldap module I have these series of warnings testing the server on a specific user:

any ideas about it?

Notice: Undefined index: telephonenumber title sn givenname description in LdapServer->groupUserMembershipsFromUserAttr() (linea 1507 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Warning: Invalid argument supplied for foreach() in LdapServer->groupUserMembershipsFromUserAttr() (linea 1512 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Notice: Undefined index: telephonenumber title sn givenname description in LdapServer->groupUserMembershipsFromUserAttr() (linea 1507 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Warning: Invalid argument supplied for foreach() in LdapServer->groupUserMembershipsFromUserAttr() (linea 1512 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Warning: Illegal string offset 'attr' in LdapServer->groupUserMembershipsFromUserAttr() (linea 1493 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Notice: Undefined index: telephonenumber title sn givenname description in LdapServer->groupUserMembershipsFromUserAttr() (linea 1507 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Warning: Invalid argument supplied for foreach() in LdapServer->groupUserMembershipsFromUserAttr() (linea 1512 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Notice: Undefined index: telephonenumber title sn givenname description in LdapServer->groupUserMembershipsFromUserAttr() (linea 1507 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Warning: Invalid argument supplied for foreach() in LdapServer->groupUserMembershipsFromUserAttr() (linea 1512 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Warning: Illegal string offset 'attr' in LdapServer->groupUserMembershipsFromUserAttr() (linea 1493 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).

Comments

francescogiannico’s picture

Ok it was a problem of configuration in Ldap server I solved it, putting memberOf into Group Attributes.
But now another problem on "Ldap Authorization" . No One can enter with his ldap credential in my drupal site.

System give these long list of errors now:

Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
francescogiannico’s picture

Ok, I solved in configuration all these strange warning. Now I have only these2 notices:

Notice: Undefined property: stdClass::$bindpw in LdapServer->__construct() (linea 181 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php).
Notice: Undefined property: stdClass::$bindpw in LdapServer->__construct() (linea 181 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php)

Some ideas?
thanks

johnbarclay’s picture

Can you see if resaving the server configuration helps. Are you using a service account for binding? Also can you say what changes you made for comment #1 to go away, so we can fix the update to 7.x-2.0.

francescogiannico’s picture

Of course, I changed configuration putting "Groups DNs (without filter)" and specifying my "ou" in "authorization" but when a ActiveDirectory user try to login has those messages above on the screen....

I don't understand the problem....

johnbarclay’s picture

Status:Active» Closed (duplicate)

this is fixed in 7.x-2.0-dev. See http://drupalcode.org/project/ldap.git/blame/refs/heads/7.x-2.x:/ldap_se... Can you confirm that the dev version solves this problem? I'll try to put out a beta3 shortly.

francescogiannico’s picture

Hi John

I changed ldap_servers/Ldap_Server.class.php with dev version. After updated the script now I have:

Notice: Undefined property: stdClass::$bindpw in LdapServer->__construct() (linea 181 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php)

I also use "Ldap Feeds" to map all my users present on active directory and import them with "Feeds" module into Drupal.
With precedent version all seems to work in a good way but now, after the update, If I try to go on "mapping" in "processor" section of "Feeds" (after I chose Ldap in Fetcher") I have several errors and warning like these:

Warning: Illegal string offset 'count' in ldap_feeds_drupal_user_legend() (linea 160 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_feeds/ldap_feeds.module).
Warning: Illegal string offset 'count' in ldap_feeds_drupal_user_legend() (linea 157 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_feeds/ldap_feeds.module).
Warning: Illegal string offset 'count' in ldap_feeds_drupal_user_legend() (linea 160 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_feeds/ldap_feeds.module).
Warning: Invalid argument supplied for foreach() in ldap_feeds_drupal_user_legend() (linea 156 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_feeds/ldap_feeds.module).
Notice: Array to string conversion in form_process_checkbox() (linea 3140 di /web_intradait/dintradait/includes/form.inc).

Also updated "Feeds module" but nothing happens. I'm not able now to create a map into Feeds...
Any ideas about this?
Thanks
Francesco

francescogiannico’s picture

Ok about this last comportment of "Feeds Import" via Ldap Feeds, I definitly turned back on Ldap Feeds of Beta 12. Now seems to be ok and no errors appear during the mapping operation in the importer.

Yes I always have the above messages in Ldap configuration (authorization) and when I do an authorization test:

Notice: Undefined property: stdClass::$bindpw in LdapServer->__construct() (linea 181 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php)

francesco

francescogiannico’s picture

Ok about this last comportment of "Feeds Import" via Ldap Feeds, I definetely turned back on "Ldap Feeds of Beta 12".

Now seems to be ok and no errors appear during the mapping operation in the importer.

Yes I always have the above messages in Ldap configuration (authorization) and when I do an authorization test:

Notice: Undefined property: stdClass::$bindpw in LdapServer->__construct() (linea 181 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_servers/LdapServer.class.php)

francesco

francescogiannico’s picture

Priority:Normal» Major
Status:Closed (duplicate)» Active

For the error message below I tried to inser the old code (beta12) of Ldap.Server.class.php present on line 167

if (isset($server_record->bindpw) && $server_record->bindpw != '') {
      $this->bindpw = $server_record->bindpw;
      $this->bindpw = ldap_servers_decrypt($this->bindpw);
    }

and use it to replace the code below in the new in dev version at line 181:

$this->initDerivedProperties($server_record->bindpw);

Now at least I have no error message on the main configurations panel of Ldap Module but also If I try to do a test authorizations I have same errors above...

Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
johnbarclay’s picture

Version:7.x-2.0-beta2» 7.x-2.x-dev
francescogiannico’s picture

Ok, John so you think I have to update my module with the dev version? Have I to delete old files? what can you say me about my configuration, Have I to reconfigure my ldap queries?

francescogiannico’s picture

Title:Ldap bug after update to 7.x-2.0-beta2 » Ldap bug into 7.x-2.x dev

Updated to last dev version. Some warning messages vanished , good I suppose, but i have alsso same error on certain pages.

Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, boolean given in _ldap_authorization_ldap_authorization_maps_alter() (linea 469 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_merge(): Argument #2 is not an array in _ldap_authorization_ldap_authorization_maps_alter() (linea 476 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
Warning: array_unique() expects parameter 1 to be array, null given in _ldap_authorization_ldap_authorization_maps_alter() (linea 477 di /web_intradait/dintradait/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc).
truman_ru’s picture

I have same error in last 2.x-dev build

johnbarclay’s picture

can you submit the authorization admin forms?

johnbarclay’s picture

Title:Ldap bug into 7.x-2.x dev» Ldap bug related to upgrading to 7.x-2.x dev
Priority:Major» Normal
Status:Active» Closed (duplicate)