View Issue Details

IDProjectCategoryView StatusLast Update
0022183mantisbtldappublic2017-02-24 13:46
Reporterevans Assigned Todregad  
PriorityimmediateSeverityblockReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformWebOSWindows SevenOS VersionX64
Product Version1.3.3 
Summary0022183: Ldap_search error in core/ldap_api.php line 335
Description

An error occurs while trying to log in with LDAP

"Ldap_search() error in core / ldap_api.php line 335"

The LDAP settings are correct because they use the same to connect to Testlink, but they do not work on Mantis.

Steps To Reproduce

trying to log in with LDAP

TagsNo tags attached.
Attached Files

Activities

evans

evans

2017-01-31 08:40

reporter   ~0055422

@atrol Could you pay attention to this case, please?

atrol

atrol

2017-01-31 09:33

developer   ~0055423

Last edited: 2017-01-31 09:33

@evans I don't use LDAP and can't help that much.
You can enable logging $g_log_level = LOG_LDAP; and check the log file if there is anything in it that might help.

dregad

dregad

2017-02-01 03:45

developer   ~0055428

I'm surprised you'd get the error at line 335; ldap_search() is a PHP API function and normally in case of problems the function should simply return 'false', which is captured by Mantis and you should find details about the problem in the Mantis log (assuming you've set $g_log_level = LOG_LDAP;.

You may also want to set $g_show_detailed_errors = ON; to get a full trace of the error.

As it is, there is not enough information to troubleshoot the issue.

evans

evans

2017-02-10 06:56

reporter   ~0055638

@dregad and @atrol

I followed all the instructions to connect Mantis to AD, until I created a specific user in AD and even then I can not connect the two for AD authentication.

I enabled the logs and the details of the errors, is it possible to analyze the problem more deeply now? Or is more information necessary?

I tried several configuration combinations and to no avail.

The detail of the error is in the attached image.

LOG:

ldap_api.php:326 ldap_authenticate_by_username() Binding to LDAP

server ldap_api.php:63 ldap_connect_bind() Attempting connection to
LDAP server/URI 'ldap://IP_Server:389'. ldap_api.php:66
ldap_connect_bind() Connection accepted by LDAP server ldap_api.php:79
ldap_connect_bind() Setting LDAP protocol version to 3
ldap_api.php:101 ldap_connect_bind() Attempting bind to ldap server
with username and password ldap_api.php:114 ldap_connect_bind() Bind
to ldap server successful ldap_api.php:334
ldap_authenticate_by_username() Searching for (&company (sAMAccountName=paulo.roberto))

Error_AD.PNG (71,869 bytes)   
Error_AD.PNG (71,869 bytes)   
dregad

dregad

2017-02-10 11:11

developer   ~0055644

Looks like there is a space in dc=spread tecnologia

What are your PHP error_reporting settings, and also your Mantis $g_display_errors settings ? try with E_ALL for the former, and array( E_ALL => 'halt' ) for the latter.
Provide the full error report (as text/html, not image); hide sensitive data as needed.

evans

evans

2017-02-10 12:13

reporter   ~0055645

@dregad,

I enabled the logs and there is no error in PHP.

It seems to me that the user I am using to log in to LDAP, is not allowed to search the information of users who will log into the mantis, is this possible?

Is there a minimum allowance in AD to be able to perform these searches?

dregad

dregad

2017-02-10 18:25

developer   ~0055648

As far as I can tell, what you are facing is a system configuration issue, either with your ldap settings in config_inc.php, or with your AD itself. Considering that I can connect to AD without any problems here, I'm pretty sure it's not a bug in MantisBT.

Since you did not provide your actual config settings or the requested debug info (0022183:0055644) , I will resolve this issue; feel free to reopen if you can prove that the error is actually caused by Mantis, and provide step-by-step instructions to reproduce and full config and log info.