AnsweredAssumed Answered

LDAP not authenticating after change to mbstring.func_overlaod value to support additional language pack

Question asked by Yasir Arsalan shaikh on May 1, 2014
Hi Alex,

Thanks for replying you are right. There are multiple arabic language packs. The pack which i downloaded was Egypt arbaic language pack. But when i tried to load the pack using module loader in admin module, it gave an error message that the package doesn't support the current version of CRM that I have in place. I am running sugarcrm 6.5.16 CE. So what i did, I just unzipped the package and manually copied and pasted the language pack files in the respective folders of sugarcrm and modified the config.php to enable the arabic language. This way i was able to see the language selection on login page. And once i tried to login using admin user, it showed everything fine but unfortunately home screen was shown blank when i used non admin user. In fact nothing was working with non admin user. I tried to check many things, like checked logs etc but didn't get any clue.

Just today i downloaded another language pack which is  Arabic Translation - SugarCRM Enterprise and first i removed all egypt language pack files that i manually copied and pasted and then tried to install the new pack "Arabic Translation - SugarCRM Enterprise". It successfully installed in 6.5.16. And now arabic language pack is working fine in both cases.

However on the contrary, i am facing a new issue after successfully installing the new arabic language pack. As you know, to fully support arabic language i needed to change the the php.ini property mbstring.func_overload value to 7 ( the default was 0), so now system is unable authenticate properly with LDAP and it is giving authentication failure message in log file.  I tried to debug this by adding few more debug lines in LDAPAuthenticateUser.php file and i found that the password which sugarcrm was using to authenticate the ldap admin user to connect to the active directory was unfortunately not being decoded successfully. I came to know this as i observed that  LDAPAuthenticateUser.php is using a line of code htmlspecialchars_decode($GLOBALS['ldap_config']->settings['ldap_admin_password']) in ldap_rdn_lookup function and when i tried to print its value, it was not printing the password correctly. My ldap admin user's password is pazzword1 but  htmlspecialchars_decode was returning pazzword + (some garbage characters instead of 1). So as a quick remedy i have hard-coded the password in LDAPAuthenticateUser.php file. But i really want to know is there any proper remedy for this problem. Just to let you know i have tried mbstring.func_overload values from 2 to 6, but it didn't solve the problem. If i changed back the property to 0 or 1, few arabic characters doesn't show up properly.

Will appreciate for your help. 


Regards,
Yasir

Note: This topic was created from a reply on the Arabic language pack only works for admin users but a blank screen is displayed f... topic.

Outcomes