LDAP Authentication

How to enable PHP LDAP extension?

136015 views January 2, 2020 March 5, 2024 shweta 147

 Step 1

      Loaded configuration file : C:\xampp\php\php.ini

  • Open php.ini file from above file path

Step 2

      For Windows users using Apache Server

  • To point to the directory of dll extensions, put this line before the extension list, extension_dir = “ext”.
  • Search for extension=php_ldap.dll in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.

     For Windows users using IIS server

  • To point to the directory of dll extensions, put this line before the extension list, extension_dir = “ext”.
  • Search for ExtensionList in the php.ini file. Uncomment the extension=php_ldap.dll line, if not present then add this line in the file and save the file.

     For Linux users

  • Install php ldap extension (If not installed yet)
    • For Debian, the installation command would be apt-get install php<your PHP version>-ldap
      • Example: apt-get install php8.0-ldap
      • Note: You can view all the available php-ldap extensions using the command: apt-cache search php-ldap
    • For RHEL based systems, the command would be yum install php-ldap
  • Search for extension=php_ldap.so in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.

Step 3

  • Restart your server. After that refresh the LDAP/AD plugin configuration page.

Was this helpful?