View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017528 | mantisbt | ldap | public | 2014-07-21 11:34 | 2014-08-02 14:54 |
Reporter | Crayon | Assigned To | atrol | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 1.2.17 | ||||
Summary | 0017528: Application error 0000401 with $g_use_ldap_realname set to ON | ||||
Description | Hello, I was able to configure Mantis to work with LDAP. But when I set $g_use_ldap_realname to ON I get an APPLICATION ERROR 0000401. The message is: The 'realname' is Stéphane and it seems the 'é' causes the problem. When setting $g_use_ldap_realname to OFF, I have no problem entering the same name in Mantis. The name appears correctly in my MySQL database. | ||||
Steps To Reproduce | Setup LDAP with $g_use_ldap_realname to ON. | ||||
Tags | No tags attached. | ||||
Maybe this is a problem with your database definition, make sure the collation for tables and columns is utf8. Run admin/check.php which might show some errors / warnings |
|
The same name could be entered with the Web interface. We use utf8_general_ci in the MySQL database. admin/check.php does not give relevant information. In database_api.php before it stops working. $p_query = UPDATE mantis_user_table SET password=? , realname=? , email=? WHERE id=? And $arr_parms ~= |
|
Just for fun I tried to get the binary result from ldap_realname. I used bin2hex like this: function ldap_realname( $p_user_id ) { The result is something like this: E9 is é with ISO 8859-1 (ISO Latin-1). If I use this code, it is now working: Of course this is not a generic fix because it is hardcoded to use ISO-8859-1. At least it works for me :) |
|
For some reason setting: Will fix the problem with special characters. Previously I was was using the default setting (0). So I'm not really sure if this is really a bug or not. If you think this is not a problem, just close the issue. |
|
Thanks for telling the solution. $g_ldap_protocol_version = 3 is the recommended setting, at least for Active Directory Do you use Active Directory? |
|
Yes we are using Active Directory. From the link you gave about LDAP 2 vs LDAP 3: "Use of UTF-8 for all text string attributes to support extended character sets." So it makes sens that it is now working when $g_ldap_protocol_version is set to 3. |
|