Josh M Josh M - 2 years ago 390
PHP Question

Fatal error: Call to undefined function: ldap_connect()

I get this error when using WAMP.

Fatal error: Call to undefined function:


I have already edited the
folder and enabled

For some reason only some of the extensions show up in
when I turn them on. I have restarted apache and restarted my computer.

Answer Source

If you are a Windows user, this is a common error when you use XAMPP since LDAP is not enabled by default.

You can follow this steps to make sure LDAP works in your XAMPP:

  • [Your Drive]:\xampp\php\php.ini: In this file uncomment the following line:

  • Move the file: libsasl.dll, from [Your Drive]:\xampp\php to [Your Drive]:\xampp\apache\bin

  • Restart Apache.
  • You can now use functions of the LDAP Module!

If you use Linux:

sudo apt-get install php5-ldap

running the above command should do the trick.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download