EGN
EGN

Reputation: 2572

Server missing "ldap.so"

I want to connect to ldap in php. However I'm getting this error

exception 'adLDAPException' with message 'No LDAP support for PHP. See: http://www.php.net/ldap'

I need to reference "ldap.so" in php.ini file. But I'm not sure how to get the file. Installed openldap but still no luck. I'm not sure what I'm missing here. Do I need to recompile php ldap? if yes, what packages I need to install

Upvotes: 2

Views: 7332

Answers (1)

Mat Carlson
Mat Carlson

Reputation: 543

Run either of these as root to install the missing extension.

Apt:

apt-get update
apt-get install php5-ldap

Yum-based systems:

yum install php-ldap
echo "extension=ldap.so" >> /etc/php.ini
service httpd restart

For you, specifically, try installing directly from RPM:

x86_64:

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/php-ldap-5.3.3-22.el6.x86_64.rpm
deb -i php-ldap-5.3.3-22.el6.x86_64.rpm

i386:

wget http://mirror.centos.org/centos/6/os/i386/Packages/php-ldap-5.3.3-22.el6.i686.rpm
deb -i php-ldap-5.3.3-22.el6.i686.rpm

Upvotes: 5

Related Questions