Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a TestLink webservice running on a server, and OpenLDAP running on other server. There are no firewall problems between them (I managed to configure Redmine, on the same server as TestLink, to use LDAP authentication).

But whenever I place the configuration for LDAP in TestLink, TestLink stops working. I have no clue on what is happening.

This is where I define LDAP's settings on custom_config.inc.php:

$tlCfg->authentication['method'] = 'LDAP';
$tlCfg->authentication['ldap_server'] = 'serverip';
$tlCfg->authentication['ldap_port'] = '389';
$tlCfg->authentication['ldap_version'] = '2';
$tlCfg->authentication['ldap_root_dn'] = 'dc=mycompany,dc=com,dc=br';
$tlCfg->ldap_organization'] = '';
$tlCfg->authentication['ldap_uid_field'] = 'uid';
$tlCfg->authentication['ldap_bind_dn'] = 'myuser'; //Not actual login name and password, for obvious reasons
$tlCfg->authentication['ldap_bind_passwd'] = 'mypassword';
$tlCfg->authentication['ldap_tls'] = false;
$tlCfg->user_self_signup = true;

I'm certain that OpenLDAP is 2.X. My TestLink version is 1.9.3

What could I be doing wrong?

share|improve this question
2  
Post the access log from the TestLink and also from the directory server. Also, don't use LDAPv2, use LDAPv3 (ldap_version). –  Terry Gardner Sep 23 '12 at 19:06
add comment

1 Answer

up vote 0 down vote accepted

I solved it. There were some dumb little errors.

First, as @Terry Gardner pointed out, I should use LDAPv3:

$tlCfg->authentication['ldap_version'] = '3';

Second, this line was wrong:

$tlCfg->ldap_organization'] = '';

The correct version would be:

$tlCfg->authentication['ldap_organization'] = '';

And finally, on /etc/php.ini I added

extension=ldap.so

For doing this, I needed to install the php-ldap package from yum.

yum install php-ldap
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.