How to enable LDAP with PHP 7.0 in Ubuntu server?

Wings2fly picture Wings2fly · Sep 30, 2016 · Viewed 94.8k times · Source

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?

Answer

NIDIA RAMIREZ picture NIDIA RAMIREZ · Nov 22, 2016

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
  • After that create a php file to get the php configuration phpinfo();
  • Now ldap is installed.