I'm trying to build a LDAP interface using php but have run into this strange problem. I have installed the php-ldap package using yum on my base php install but whenever I call ldap_connect() it says the function is undefined. Seeing phpinfo() I can verify that the ldap extension is indeed installed and enabled.
Install LDAP in Linux 2.1 If your PHP is compiled and installed, you need to add the"--with-ldap" to recompile the installation. 2.2 If your PHP is installed through the Linux package manager, you can install the php_ldap through the package manager. Taking Debian as an example, implement apt-get install php5-ldap.
LDAP is the Lightweight Directory Access Protocol, and is a protocol used to access "Directory Servers". The Directory is a special kind of database that holds information in a tree structure.
Are you sure you have openldap included?
I just realized I have the same issue where phpinfo shows me several other ldap modules loaded by apache, but I do no have openldap
http://www.php.net/manual/en/ldap.installation.php
I just got a successful install following the directions here: http://www.aoddy.com/2009/01/18/how-to-install-php-ldap-module-on-centos5/
Instructions from link:
yum install php-ldap
vi /etc/php.ini
extension=ldap.so
service httpd restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With