Topic on Extension talk:LDAPProvider/Flow

Call to undefined function ldap_connect()

11
Igor-the-insane (talkcontribs)

/wiki/index.php/Special:PluggableAuthLogin Error from line 244 of /var/www/mediawiki-1.34.0/extensions/LDAPProvider/src/PlatformFunctionWrapper.php: Call to undefined function ldap_connect()

Backtrace:

#0 /var/www/mediawiki-1.34.0/extensions/LDAPProvider/src/PlatformFunctionWrapper.php(261): MediaWiki\Extension\LDAPProvider\PlatformFunctionWrapper->connect()

#1 /var/www/mediawiki-1.34.0/extensions/LDAPProvider/src/Client.php(88): MediaWiki\Extension\LDAPProvider\PlatformFunctionWrapper::getConnection()

#2 /var/www/mediawiki-1.34.0/extensions/LDAPProvider/src/Client.php(76): MediaWiki\Extension\LDAPProvider\Client->makeNewConnection()

#3 /var/www/mediawiki-1.34.0/extensions/LDAPProvider/src/Client.php(313): MediaWiki\Extension\LDAPProvider\Client->init()

#4 /var/www/mediawiki-1.34.0/extensions/LDAPAuthentication2/src/PluggableAuth.php(76): MediaWiki\Extension\LDAPProvider\Client->canBindAs()

#5 /var/www/mediawiki-1.34.0/extensions/PluggableAuth/includes/PluggableAuthLogin.php(30): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate()

#6 /var/www/mediawiki-1.34.0/includes/specialpage/SpecialPage.php(575): PluggableAuthLogin->execute()

#7 /var/www/mediawiki-1.34.0/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run()

#8 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath()

#9 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(900): MediaWiki->performRequest()

#10 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(527): MediaWiki->main()

#11 /var/www/mediawiki-1.34.0/index.php(44): MediaWiki->run()

#12 {main}


Server is CentOS 7, php 7.4.2, http 2.4.6

Osnard (talkcontribs)

Have you installed the PHP extension "php-ldap"? You should be able to install using "yum" or "zypper"

193.73.106.104 (talkcontribs)

Thx Osnar, this solved the Problem

Apatha11 (talkcontribs)

HI I have installed "yum install php-ldap" but still facing same issue.

Osnard (talkcontribs)

Please make sure the extension is enabled when PHP is invoked by the webserver. You can check this using `phpinfo();` in some file served by your webserver.

143.97.2.35 (talkcontribs)

Yes!! extension is enabled.

SanjayKSahu (talkcontribs)

we're also having same issue with LDAPs connectivity, But, we do not have the package 'rh-php74-php-ldap.x86_64' available in our RHEL7.9 server. Pls suggest trusted source to download & install the same under RHEL7.9

Osnard (talkcontribs)

Sorry, I am not an expert for RedHat/CentOS servers. Maybe people from the respective boards and mailing lists can provide better answers. All I can say is that Call to undefined function ldap_connect() indicates that the PHP extension for LDAP is not properly loaded.

Apatha11 (talkcontribs)

Hi, I am using LDAPProvider and I have set PARAMS in ldapprovider.json.

I am facing an issue connecting my domain as I have added the correct domain.

Error: extensions/LDAPProvider/src/DomainConfigFactory.php: No configuration available for domain 'example.net'!

I am Using v1.35.0 LDAPStack LocalSettings.php from URL:

LDAP_hub/Migration_from_extension_LDAPAuthentication#Auth_remoteuser_(Kerberos_auth)_with_LDAPProvider_features


Also, I want to know from which file domain name is picking up. I have changed the domain name from Localsetiings.php and ldapprovider.json but it's still showing the same.

Please suggest.

Thanks

Osnard (talkcontribs)
Reply to "Call to undefined function ldap_connect()"