View Issue Details

IDProjectCategoryView StatusLast Update
0017228mantisbtauthenticationpublic2014-04-27 07:47
Reportermach825 Assigned Toatrol  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Platformx86OSWindows 2008 R2OS VersionRevision 2
Product Version1.2.17 
Summary0017228: Trying to get Mantis to work with Active Directory
Description

I have been trying to get Active Directory authentication working with mantis for a little while.

My environment is:
This is in the lab. Once i work out this bug. I will move the system to production.
My Mantis server is a windows 2008 R2 box. The server is running XAMPP v3.2.1. It has Apache, MySQL and PHP running on it. The PHP.ini file has the extension=php_ldap.dll uncommented.
I have ADLogin101 plugin installed in Mantis.
My config_inc.php currently looks like this.

<?php
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'helpdesk';
$g_db_username = 'root';
$g_db_password = '';
$g_login_method = LDAP;
$g_ldap_protocol_version = 3;
$g_ldap_server = 'ldap://lab-dc-01.Domain.lab:389';
#$g_ldap_port = '389';
$g_ldap_root_dn = 'CN=Users,DC=Domain,DC=lab';
$g_ldap_organisation = 'Domain.lab';
$g_ldap_uid_field= 'sAMAccountName';
$g_ldap_bind_dn = 'svc_ldap';
$g_ldap_bind_passwd = '
';
$g_allow_signup= 'OFF';
$g_ldap_uid_field= 'sAMAccountName';
$g_log_level = LOG_LDAP;
$g_log_destination = 'file:C:\xampp-prod\htdocs\help\log\mantisbt.log';
?>

The log is getting this error
2014-04-16 15:36 CEST ldap Binding to LDAP server
2014-04-16 15:36 CEST ldap Error: LDAP extension missing in php

I am receiving this error on my web page

APPLICATION ERROR #1404

LDAP Extension Not Loaded.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Any help on this would be greatly appreciated.

Thank you,
Shannon

Steps To Reproduce

Researched the internet to find similar problems. Tried different suggestion from blogs with same results.

TagsNo tags attached.

Activities

grangeway

grangeway

2014-04-16 11:48

reporter   ~0040104

The error would imply it's not finding the LDAP module in php being loaded.

Maybe make a new test.php with <?php var_dump( extension_loaded ( 'ldap' ) ); and see whether that returns true or false in your dev/production environments

I'm just wondering however, you mention are using windows 2008 R2 - is there a reason you picked apache over IIS?

atrol

atrol

2014-04-16 14:08

developer   ~0040105

BTW
you have to set
$g_allow_signup= OFF;
instead of
$g_allow_signup= 'OFF';

mach825

mach825

2014-04-16 14:09

reporter   ~0040106

I guess the only real reason I selected Apache over IIS is that it is part of the XAMPP package. I wanted something fairly simple. With XAMPP it had everthing in one simple package. If Mantis works better on IIS with Window then I can go that route.

mach825

mach825

2014-04-16 14:10

reporter   ~0040107

Thanks Atrol, I will make that change.

atrol

atrol

2014-04-16 14:16

developer   ~0040108

mach825,

This is not a bug or feature request for MantisBT (you are asking for help on how to setup your runtime environment). I am therefore resolving this issue as "no change required".

Please use the forums, the mantisbt-help mailing list or IRC to get support on customizing and using MantisBT (refer to http://www.mantisbt.org/support.php for links and further details).

You should certainly check what grangeway told you.

mach825

mach825

2014-04-16 14:22

reporter   ~0040109

Good news I did a complete rebuild of XAMPP on another server with a slightly newer version. Moved a libsasl.dll and I am now getting completely different results. Bad news still not getting logged in.

  1. Added [Your Drive]:\xampp\php to the PATH environment variable.
  2. Move the file: libsasl.dll, from [Your Drive]:\xampp\php to [Your Drive]:\xampp\apache\bin.
  3. Restart Apache from XAMPP Control Panel

http://ammadsaleem.blogspot.com/2012/07/enabling-ldap-on-xampp-180-for-active.html

mach825

mach825

2014-04-16 14:34

reporter   ~0040110

Thanks for your help.

Sorry I reported my problem on the wrong system. I can go over to the forums if I don't have it. I think I am very close. I had used a newer version of XAMPP and did the fix I previously wrote about.

As far as using Apache or IIS I would guess that this should work equally well with either Webserver. Probably should even work better with Apache as it seems to be a very large base of Mantis users use Linux.

Thanks again

grangeway

grangeway

2014-04-16 16:18

reporter   ~0040111

Microsoft started doing a lot of work to improve IIS (aka try to get market share from Linux/apache threat) - so they improved PHP support.

In any case, IIS vs Apache is a bit like comparing red and green grapes to the person browsing the website.

The only thing I would say is where they have their 'web platform' thing now, it's possibly easier to keep on top of security updates with that + IIS then apache+php, and you do get the 'benefit' of having a GUI to poke around some of the config's if text files isn't your thing.

However, more IMPORTANTLY: WHAT VERSION OF PHP is in this stack? [According to http://www.php.net/manual/en/ldap.installation.php: "Versions before PHP 4.3.0 additionally require libsasl.dll" - so I'm somewhat concerned you trying to run a something really old (and possibly insecure) if you are hitting issues with that dll being missing.

mach825

mach825

2014-04-17 09:27

reporter   ~0040116

The version of PHP for XAMPP 1.8.3-3VC11 is PHP version 5.5.11.