I have recently upgraded Ubuntu to version 16.04 and PHP to version 7. However, the ldap connection is not working.
How to enable ldap in PHP 7?
I have recently upgraded Ubuntu to version 16.04 and PHP to version 7. However, the ldap connection is not working.
How to enable ldap in PHP 7?
To install ldap on a lamp with PHP version 7.0 (or 7.1):
apt-get install php7.0-ldap
(or use apt-get install php7.1-ldap
)service apache2 restart
Providing the php version number is no more required:
apt-get install php-ldap
Is enough now, the correct package version will be automatically installed.
PS: Note that is it true if you use the standard php packages provided by your distribution. If you are using an additional ppa for PHP like the sury one, you will have to specify the version number as there are multiple versions available.
install both php ldap for your specific php version, mine was
sudo apt install php7.2-ldap php-ldap -y
it solves the problem i was having