View Issue Details

IDProjectCategoryView StatusLast Update
0030771mantisbtldappublic2023-02-22 19:21
Reporterdregad Assigned Todregad  
Status closedResolutionfixed 
Target Version2.25.6Fixed in Version2.25.6 
Summary0030771: Poor error handling when $g_login_method = LDAP and PHP extension missing

When using LDAP login method and the LDAP PHP extension is not available, MantisBT UI loads partially (only the top navbar is displayed over a gray background, see attached screenshot) and is non-functional, but no error message is shown.

Inspecting the PHP error log shows _Call to undefined function ldapconnect()

A clear error message should be displayed to the user.

TagsNo tags attached.
Attached Files
image.png (16,550 bytes)   
image.png (16,550 bytes)   


Related Changesets

MantisBT: master 4dd581f6

2022-07-09 12:22


Details Diff
Add core.php function ensure_php_extension_loaded()

Returns true if given PHP extension is loaded, dies if not.

Use the new function to replace an if statement checking for 'mbstring'.

This will avoid code duplication, as we need to introduce the same
check for 'ldap' extension to fix issue 0030771.
Affected Issues
mod - core.php Diff File

MantisBT: master f36f6d31

2022-07-09 12:24


Details Diff
Ensure LDAP ext loaded when $g_login_method = LDAP

Fixes 0030771
Affected Issues
mod - core.php Diff File

MantisBT: master 90348a0c

2022-07-10 06:34


Details Diff
Remove PHP extension check from ldap_connect_bind()

The check is now performed globally in core.php, so it is no longer
necessary here.

Also remove the now-unused ERROR_LDAP_EXTENSION_NOT_LOADED constant and
corresponding error message from language strings.

Fixes 0030771
Affected Issues
mod - core/constant_inc.php Diff File
mod - core/ldap_api.php Diff File
mod - lang/strings_afrikaans.txt Diff File
mod - lang/strings_arabic.txt Diff File
mod - lang/strings_arabicegyptianspoken.txt Diff File
mod - lang/strings_belarusian_tarask.txt Diff File
mod - lang/strings_breton.txt Diff File
mod - lang/strings_bulgarian.txt Diff File
mod - lang/strings_catalan.txt Diff File
mod - lang/strings_chinese_simplified.txt Diff File
mod - lang/strings_chinese_traditional.txt Diff File
mod - lang/strings_czech.txt Diff File
mod - lang/strings_danish.txt Diff File
mod - lang/strings_dutch.txt Diff File
mod - lang/strings_english.txt Diff File
mod - lang/strings_estonian.txt Diff File
mod - lang/strings_finnish.txt Diff File
mod - lang/strings_french.txt Diff File
mod - lang/strings_galician.txt Diff File
mod - lang/strings_georgian.txt Diff File
mod - lang/strings_german.txt Diff File
mod - lang/strings_hebrew.txt Diff File
mod - lang/strings_hungarian.txt Diff File
mod - lang/strings_icelandic.txt Diff File
mod - lang/strings_interlingua.txt Diff File
mod - lang/strings_italian.txt Diff File
mod - lang/strings_japanese.txt Diff File
mod - lang/strings_korean.txt Diff File
mod - lang/strings_lithuanian.txt Diff File
mod - lang/strings_macedonian.txt Diff File
mod - lang/strings_norwegian_bokmal.txt Diff File
mod - lang/strings_occitan.txt Diff File
mod - lang/strings_polish.txt Diff File
mod - lang/strings_portuguese_brazil.txt Diff File
mod - lang/strings_portuguese_standard.txt Diff File
mod - lang/strings_ripoarisch.txt Diff File
mod - lang/strings_romanian.txt Diff File
mod - lang/strings_russian.txt Diff File
mod - lang/strings_serbian.txt Diff File
mod - lang/strings_serbian_latin.txt Diff File
mod - lang/strings_slovak.txt Diff File
mod - lang/strings_spanish.txt Diff File
mod - lang/strings_swedish.txt Diff File
mod - lang/strings_swissgerman.txt Diff File
mod - lang/strings_tagalog.txt Diff File
mod - lang/strings_turkish.txt Diff File
mod - lang/strings_ukrainian.txt Diff File
mod - lang/strings_vietnamese.txt Diff File