Hi,
it's me one more time - seems like I've got a talent in crashing this module(s) ;D

Circumstances:
-Drupal core 7.18 on apache2 with php_fcgi & xcache
-Installed first page on 7.17 and configured ldap server/user/authentication/authorization
-Upgraded core to 7.18 but sites runs except this bug
-created a another, fresh site
-entered the same settings for ldap server as I did for the first one - bug occurs
-even tried copying the ldap_server table with phpmyadmin (date&structure) but no change

Bug:
the basedn on the second side isn't resolved correctly:
basedn = a:2:{i:0;s:39:"ou=people,dc=fmc,dc=uni-karlsruhe,dc=de";i:1;s:39:"ou=groups,dc=fmc,dc=uni-karlsruhe,dc=de";}

while it's on the primary created page: basedn = Array ( [0] => ou=people,dc=fmc,dc=uni-karlsruhe,dc=de [1] => ou=groups,dc=fmc,dc=uni-karlsruhe,dc=de )

the rest of the displayed settings seems to be identical.
If I try to run a test on the server with username/password, following is displayed:
Notice: Use of undefined constant LDAP_USER_PROV_DIRECTION_ALL - assumed 'LDAP_USER_PROV_DIRECTION_ALL' in ldap_servers_test_user_mapping() (Zeile 374 von <myPath>/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc).

is a replacement for the displayed (long) server path

CommentFileSizeAuthor
#9 1882200-9-ldap-requires-ctools.patch360 bytesmicahw156

Comments

fbouzek’s picture

I'm having the same bug issue as you with the base DN passing differently.

As for the Notice error, I was getting that until I enabled the Ldap User module and configured that. I guess that is a bug that needs to be fixed also.

johnbarclay’s picture

Is LDAP User Module enabled?

KeepXtreme’s picture

after enabling user(+configuration) & numbers module and , the "Notice: ..." disappeared instead now nothing is displayed when testing the server with user+password --> I would suggest disabling these fields unless user module is activated - or display a warning like "needs user module" should be displayed or something else

but nevertheless, the original problem with not resolving the basedn still exists

KeepXtreme’s picture

Issue summary: View changes

shortened

fbouzek’s picture

Looks like we may be having the same issue: http://drupal.org/node/1882276

alexanderperlis’s picture

The following band-aid might solve this: http://drupal.org/node/1880310#comment-6926478

joegraduate’s picture

I can confirm the issue with the basedn value not being unserialized properly using version 7.x-2.0-beta3, however I have found that this problem only exists on sites that do not also have the Chaos tools (ctools) module installed/enabled. On sites that do have ctools installed, the basedn value seems to be unserialized properly and my LDAP configurations work normally.

Looking at the source code for this project I can see that LDAP Servers module does check to see if the ctools module exists in the LdapServer class' constructor method but I have not been able to investigate further why that affects the basedn value yet.

KeepXtreme’s picture

Status: Active » Needs review

Indeed, the Chaos Tools module is necessary for LDAP Server module to work properly
thank you very much for your help!

johnbarclay’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev
micahw156’s picture

StatusFileSize
new360 bytes

I just spent about fifteen minutes chasing down a similar error. Found this issue. Enabling ctools fixed my problem, too.

Rolled a patch to add ctools as a dependency for ldap_server based on Joe Parson's findings in #6 above. Not sure that this necessarily addresses the double-serialization bugs found in the other issues mentioned here, but at least it's a quick fix for one of the problems involved.

johnbarclay’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. I'll commit this next round of commits.

johnbarclay’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

vinmassaro’s picture

Status: Closed (fixed) » Active

Reopening because I still get this error with 7.x-2.x when testing against AD. We are using CAS, CAS Attributes, and LDAP to map data to Drupal. We don't need to use the ldap_user module in this case since tokens are available by CAS Attributes. When I enable ldap_user, this error message goes away.

johnbarclay’s picture

@vinmassaro if you are mapping data, ldap user should be enabled

vinmassaro’s picture

@jonbarclay: We have been doing without ldap_user on hundreds of sites with our university Drupal install. CAS Attributes provides tokens and takes care of the mapping to user profile fields.

johnbarclay’s picture

Status: Active » Needs review

This is fixed. I just removed the extraneous function parameter. Please test and close if you don't get the error.

Glad I could help the Yale websites: my daughter went there and Yale's contribution of CAS is awesome.

johnbarclay’s picture

Title: LDAP Server: Weird basedn problem on multipage install » LDAP Server: Error thrown in ldap server test page when not using ldap user module
mlsamuelson’s picture

Status: Needs review » Closed (fixed)

I was experiencing the error. Applied the commit mentioned in #16 (http://drupalcode.org/project/ldap.git/commit/0d7b701). Error's gone. The commit is straightforward, looks good.

Updating the status to "closed (fixed)" as requested.

Thank you johnbarclay.

mlsamuelson’s picture

Issue summary: View changes

link corrected