I got this error when I was trying to get my drupal installation authenticate using the local ldap directory. Initially, I had thought that I was getting error because of my ldap settings. Then I enabled error reporting on my site, that is when this error was displayed to me.
This error is caused, I suppose due to the missing package php5-ldap in the system. After I installed this package using apt-get and restarted apache2, LDAP authentication wroked fine.