简体   繁体   中英

How to enable ldap in php MAMP?

I would like to create a Login System with Active Directory. so I use the adLDAP to do that. but finally, When I login in web Login page, It display

exception 'adLDAPException' with message 'No LDAP support for PHP.
See: http://www.php.net/ldap' in C:\MAMP\htdocs\adLDAP\src\adLDAP.php:600 
Stack trace: #0 C:\MAMP\htdocs\adLDAP\examples\authenticate.php(29): 
adLDAP->__construct() #1 {main}

Error

and extension php_ldap.dll in php.ini

在此处输入图片说明

and make sure I have php_ldap.dll file 在此处输入图片说明

but still not work

I create a

<?php
phpinfo();
?>

to check Is the ldap enable?? but it is not enabled...... any Idea, thx very much My php version is MAMP PHP Version 5.6.30

To check if LDAP is available for you just check if function ldap_connect exists:

if (!function_exists('ldap_connect')) {
    die('Your server does not support LDAP');
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM