Setting up ldap after upgrade

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
Sebzy
Posts: 7
Joined: Wed Oct 20, 2010 5:52 pm

Setting up ldap after upgrade

Post by Sebzy » Mon Nov 08, 2010 2:45 pm

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';

Thorsten
Posts: 14759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Setting up ldap after upgrade

Post by Thorsten » Mon Nov 08, 2010 3:04 pm

Hi,

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

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Sebzy
Posts: 7
Joined: Wed Oct 20, 2010 5:52 pm

Re: Setting up ldap after upgrade

Post by Sebzy » Mon Nov 08, 2010 5:13 pm

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

Thorsten
Posts: 14759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Setting up ldap after upgrade

Post by Thorsten » Mon Nov 08, 2010 7:31 pm

Hi,

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

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Sebzy
Posts: 7
Joined: Wed Oct 20, 2010 5:52 pm

Re: Setting up ldap after upgrade

Post by Sebzy » Tue Nov 09, 2010 11:56 am

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

Thorsten
Posts: 14759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Setting up ldap after upgrade

Post by Thorsten » Tue Nov 09, 2010 2:23 pm

Hi,

cool news!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply