Dutch PHP Conference 2025 - Call For Papers

Установка

Поддержка LDAP в PHP не доступна по умолчанию. Для активации нужно использовать опцию --with-ldap[=DIR] при компиляции PHP, где DIR - это каталог установки базы LDAP. Для включения поддержки SASL, убедитесь что использована опция --with-ldap-sasl[=DIR], и что sasl.h существует в системе.

Замечание: Примечание для пользователей Win32

Чтобы модуль работал, системной переменной PATH, которую содержит операционная система Windows, дают доступ к DLL-файлам. Раздел FAQ «Как добавить директорию PHP в переменную PATH в Windows» рассказывает, как это сделать. Не рекомендуют копировать DLL-файлы из директории PHP в системную папку Windows, хотя это также решает проблему (потому что системная директория по умолчанию записана в переменной PATH). Модулю нужны следующие файлы в переменной PATH: libeay32.dll и ssleay32.dll, либо, начиная с OpenSSL 1.1, libcrypto-*.dll и libssl-*.dll.

Для того чтобы использовать библиотеки Oracle LDAP, должны быть установлены надлежащие параметры окружающей среды Oracle.

add a note

User Contributed Notes 6 notes

up
81
Frank
11 years ago
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
up
30
msuzer
12 years ago
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.
up
6
p38fln at msn dot com
5 years ago
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.
up
5
Anonymous
9 years ago
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.
up
3
tom at wheelercreek dot com
15 years ago
If you're running on Windows XP with Apache, and you installed PHP 5 from the windows installer rather than the full zipped version - you may not have the php_ldap.dll file.

I had to follow the steps above, making sure PHP was added to my Windows Path, adding the 2 dll files to the system32 directory, also making sure the php.ini extensions directory was set correctly (in my case: C:\Program Files\PHP\ext).

Still was a getting a message about not being able to locate the "php_lamp.dll" file. I finally went back, downloaded the full .zip file of latest PHP version, and that missing dll file is included there - along with many others.

Remember to restart Apache server after you do all this.
up
0
nesbittp
10 years ago
To enable PHP LDAP for IIS, I installed PHP Manager which integrates with IIS. Open this up and you can enable/disable extensions. Enable php_ldap.dll and it works straight away.
To Top