Page 1 of 1

Setting up ldap after upgrade

Posted: Mon Nov 08, 2010 2:45 pm
by Sebzy
Hi

I am trying to setup ldap on my phpMyFAQ 2.6.11 install

I did not set it up when I first installed the faq but want the functionality now.
What would be required to set this up now?

============================================
I have tried the following

- verified my php has the ldap extension loaded.

- Contend of "config/constants_ldap.php"
$PMF_LDAP['ldap_mapping'] = array ('name' => 'cn', 'username' => 'cn', 'mail' => 'mail');
$PMF_LDAP['ldap_use_domain_prefix'] = true;
$PMF_LDAP["ldap_options"] = array ( LDAP_OPT_PROTOCOL_VERSION => 3, LDAP_OPT_REFERRALS => 0 );
$PMF_LDAP['ldap_use_sasl'] = false;

- Unable to find inc/ldap.php

- Enabled LDAP support from within the FAQ admin

=======================================================

Should I manually create ldap.php in inc with the following contents

<?php
$PMF_LDAP["ldap_server"] = 'ad.server.com';
$PMF_LDAP["ldap_port"] = '389';
$PMF_LDAP["ldap_user"] = 'AD\username';
$PMF_LDAP["ldap_password"] = 'XXXXXXX';
$PMF_LDAP["ldap_base"] = 'ou=staff,dc=ad,dc=server,dc=com';

Re: Setting up ldap after upgrade

Posted: Mon Nov 08, 2010 3:04 pm
by Thorsten
Hi,

the last part has to be located in config/ldap.php and then it should work.

bye
Thorsten

Re: Setting up ldap after upgrade

Posted: Mon Nov 08, 2010 5:13 pm
by Sebzy
Thorsten wrote:Hi,

the last part has to be located in config/ldap.php and then it should work.

bye
Thorsten
Thanks for the reply

placed ldap.php into config/ but authentication is rejected at the login screen.
is there a way to some some sort of debug/log for ldap auth?

Thanks

Re: Setting up ldap after upgrade

Posted: Mon Nov 08, 2010 7:31 pm
by Thorsten
Hi,

if it's rejected you should see errors in the error log of your LDAP server.

bye
Thorsten

Re: Setting up ldap after upgrade

Posted: Tue Nov 09, 2010 11:56 am
by Sebzy
I figured out what was wrong with help from the Adminlog.

When logging in I was using a simple username but once I changed it to ad\username everything worked fine.

Thanks

Re: Setting up ldap after upgrade

Posted: Tue Nov 09, 2010 2:23 pm
by Thorsten
Hi,

cool news!

bye
Thorsten