LDAP support in PHP is not enabled by default. You will need to use the --with-ldap[=DIR] configuration option when compiling PHP to enable LDAP support. DIR is the LDAP base install directory. To enable SASL support, be sure --with-ldap-sasl[=DIR] is used, and that sasl.h exists on the system.
Note: Note to Win32 Users
为锟斤拷使锟斤拷锟斤拷展锟斤拷效锟斤拷 DLL 锟侥硷拷锟斤拷锟斤拷锟斤拷锟斤拷 Windows 系统锟斤拷 PATH 指示锟斤拷路锟斤拷锟斤拷锟揭碉拷锟斤拷锟斤拷尾锟斤拷锟斤拷锟斤拷锟较拷锟斤拷锟轿硷拷锟斤拷为"锟斤拷锟斤拷锟� Windows 锟叫斤拷 PHP 目录锟接碉拷 PATH 锟斤拷"锟斤拷FAQ锟斤拷锟斤拷然锟斤拷 DLL 锟侥硷拷锟斤拷 PHP 锟侥硷拷锟叫革拷锟狡碉拷 Windows 系统目录也锟叫o拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 锟斤拷锟斤拷展锟斤拷要锟斤拷锟斤拷锟侥硷拷锟斤拷 PATH 路锟斤拷锟叫o拷 libeay32.dll and ssleay32.dll, or, as of OpenSSL 1.1 libcrypto-*.dll and libssl-*.dll
In order to use Oracle LDAP libraries, proper Oracle environment has to be set.