I'm getting Error 53: Server is unwilling to perform and attempting to debug the cause. ldap_servers_test_form() in ldap_servers/ldap_servers.test_form.inc has some session based logic to display test results, but it doesn't work when there is an error. Since it is a test page, it should always display something. Right?

(required) Test the server configuration at admin/config/people/ldap/servers with the test link. Enter a drupal username in "Testing Drupal Username" on the test form.

The result is nothing and the reason this issue was created.

Issue Reporting

Server and LDAP Module

OK
Apache Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
OK
PHP version 5.3.6
OK
PHP ldap extension data
LDAP Support: enabled
RCS Version: $Id: ldap.c 306939 2011-01-01 02:19:59Z felipe $
Total Links: 0/unlimited
API Version: 3001
Vendor Name: OpenLDAP
Vendor Version: 20411
Directive: Array
(
CommentFileSizeAuthor
#3 ldap-server_tests-1823670-3.patch15.92 KB13rac1
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

13rac1’s picture

Title: Server test displays nothing on connection error » ldap_servers: Server test displays nothing on connection error
13rac1’s picture

Issue summary: View changes

Spelling

johnbarclay’s picture

Title: ldap_servers: Server test displays nothing on connection error » LDAP Server: Server test form displays nothing on connection error

Yes. The test form should be as helpful as possible as LDAP connections can be very frustrating.

The script at ldap_help/ldap_test_script may also be useful for debugging ldap connection issues. Its intent is to isolate php ldap connection issues from drupal ldap module connection issues.

For the patch to this issue, try catch or simply putting "@" before the ldap function will do the job. Then ldap_error($conn) can be used to get the error message.

13rac1’s picture

Status: Active » Needs review
FileSize
15.92 KB

Attached is a patch to adjust ldap_servers.test_form.inc to display connection errors, use Form API rebuild=TRUE storage instead of $_SESSION, not require entity module, and not error when a username isn't specified. It also fixes EOL whitespace(my editor did this.)

Needs review, then possibly needs work. I don't have access to test the advanced group features, so I've left that code alone.

johnbarclay’s picture

I committed this. Thanks. Very helpful patch.

johnbarclay’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Adding reporting data.. oops