Greetings,

I've installed PHP with ldap.  But I got this error "Fatal error: Call to
undefined function: ldap_connect() in /home/me/public_html/test1.php on
line 5".  Why ldap_connect() is undefined?

This is what I did:

==========
# ./configure --with-apxs=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/apache/php.ini --with-mysql --with-zlib
--with-ldap
# make
# make install
==========

It went through without obvious errors.

And this is the PHP script test1.php that generates the above error:

====
<?php
$dn="cn=john smith, ou=Users, ou=eng,dc=iastate, dc=edu";
$password = "ok4now";

if (!($ldap = ldap_connect("w2kdc1.eng.some.edu", 389))) {
die ("Could not connect to LDAP server");
}
if (!($res = @ldap_bind($ldap, $dn, $password))) {
die ("Could not bind to $dn");
}
echo "bind fine!";
?>
====

So my question is how to verify PHP has been installed with ldap support?

Thanks in advance for any help,

Bing

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to