Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable LDAP with PHP 7.0 in Ubuntu server?

Tags:

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?

like image 273
Wings2fly Avatar asked Sep 30 '16 07:09

Wings2fly


People also ask

How do I know if PHP is LDAP enabled?

You can try and check it with extension_loaded() like this: $builtWithLdap = extension_loaded('ldap'); or alternativly as a crowbar approach, just check if one of the functions exists: $builtWithLdap = function_exists('ldap_add');

What is LDAP PHP?

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.


1 Answers

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.
like image 78
NIDIA RAMIREZ Avatar answered Sep 18 '22 05:09

NIDIA RAMIREZ