I found not only "Versions before PHP 4.3.0 additionally require libsasl.dll.".
If you use php-5.3.3-Win32-VC9-x86 or later Versions that
It's require libsasl.dll.
Running under Windows & Apache 2.2.8
PHP file is download from http://windows.php.net/downloads/releases/archives/
When I use php-5.2.x-Win32-VC6-x86 and php-5.3.x-Win32-VC6-x86
1.just uncomment extension=php_ldap.dll in php.ini
2.Restart apache,it's ok
When I use php-5.3.x-Win32-VC9-x86 and php-5.4.x-Win32-VC9-x86
1.just uncomment extension=php_ldap.dll in php.ini
2.Restart apache,always fail...
(only php-5.3.1-Win32-VC9-x86 & php-5.3.2-Win32-VC9-x86 is ok. )
[php-5.3.3-Win32-VC9-x86 or later Versions]
1.just uncomment extension=php_ldap.dll in php.ini
2.copy libsasl.dll to [apache folder]\bin
3.Restart apache,it's okИнсталација
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Инсталација
Референца за `ldap.installation.php` со подобрена типографија и навигација.
Инсталација
LDAP поддршката во PHP не е овозможена по дифолт. Ќе треба да го користите --with-ldap[=DIR] опцијата за конфигурација при компајлирање на PHP за да се овозможи LDAP поддршка. DIR е основната директориум за инсталација на LDAP. За да се овозможи SASL поддршка, бидете сигурни --with-ldap-sasl[=DIR] се користи, и дека sasl.h постои на системот.
Забелешка: е достапна што предизвикува PHP да ја користи системската листа на шифри наместо тврдо кодирана стандардна.
Забелешка за корисниците на Win32 DLL За да работи оваа екстензија, постојат PATHдатотеки што мора да бидат достапни за системот Windows FAQ . За информации за тоа како да го направите ова, видете гонасловен"Како да ја додадам мојата PHP директориум во PATH на Windows" PATH". Иако копирањето DLL датотеки од папката PHP во системската директориум на Windows исто така работи (бидејќи системската директориум по дифолт е во системската ), ова не се препорачува. PATH: libeay32.dll and ssleay32.dll, или, од OpenSSL 1.1 , или, од OpenSSL 1.1, and libssl-*.dll
За да се користат Oracle LDAP библиотеки, соодветно Oracle environment мора да се постави.
Белешки од корисници 5 белешки
If using a debian machine (debian or ubuntu variants) just do apt-get install php5-ldap, that's all to get ldap work on php. No need to get sources, try to compiling them and so on.On newer versions of Windows and Windows Server, if you've installed PHP from the Microsoft Web Platform Installer (PI) then all you have to do is add extension=php_ldap.dll to the extensions section and restart IIS.OCI client from Oracle distributes un ldap.h which may collision with the SO ldap.h.
You can, remove the Oracle ldap.h and build or configure php without oci8 and then add OCI8 later as a shared extension.
This latter step is easiest using PECL: pecl install oci8. You will then need to add 'extension=oci8.so' to your php.ini.For Windows Platform/LDAPS/Active Directory, aside from enabling php_ldap.dll in PHP.ini, you will also have to add trusted RootCA file reference. That's because OpenLDAP, by default, is looking for "C:\openldap\sysconf\ldap.conf", which doesn't exists. Create the missing patch/file and inside the file: TLS_CACERT <explicit file path to RootCA of Active Directory issuer>.
If you do not like default C:\ path above, create an environment variable, LDAPCONF=<file path>. Restart IIS for change to take effect.
[Example] - assume PHP is under D:\PHP
1. create new, empty file D:\PHP\ldap.conf
2. add inside file: TLS_CACERT D:\PHP\rootCA.pem
3. copy your Active Directory's Root CA cert file (rootCA.pem) to D:\PHP
4. add Environment Variable: LDAPCONF=D:\PHP\ldap.conf
5. Restart IIS: iisreset /restart