Hoping someone can find out where I am going wrong here, 'cause I'm going around and around and getting no where! I've got a WAMP5 install which integrates PHP Version 5.2.4, Apache/2.2.4 (Win32) and MYSQL on a Win XP machine. All works fine, but I can't get LDAP support to work.
希望有人能发现我在这里做错了什么,因为我在这里走来走去,却找不到方向!我有一个WAMP5安装,它集成了PHP 5.2.4、Apache/2.2.4 (Win32)和MYSQL在Win XP机器上。所有这些都可以工作,但是我无法使LDAP支持工作。
I've checked extension_dir = "c:/wamp/php/ext/" and extension=php_ldap.dll in php.ini and checked the dll is actually in that folder. I've copied libeay32.dll and ssleay32.dll to the c:windows\system32 folder
我检查过extension_dir = "c:/wamp/php/ext/"和extension=php_ldap。dll在php。ini和检查dll实际上在那个文件夹中。我复制libeay32。dll和ssleay32。dll到c:windows\system32文件夹
With this code :
这段代码:
$host = "192.168.56.25";
if (!$ldapconn = ldap_connect($host, 80)) {
echo "Error! Could not connect to LDAP host $host\n";
}
I get this error : Fatal error: Call to undefined function ldap_connect()... I don't know where to start checking because I guess all conditions are achieved for my WAMP to take into consideration Ldap. Please help! Thanks
我得到这个错误:致命错误:调用未定义的函数ldap_connect()…我不知道从哪里开始检查,因为我想我的WAMP已经满足了考虑Ldap的所有条件。请帮助!谢谢
2 个解决方案
#1
10
You need to enable LDAP in your php.ini file. Uncomment this line:
您需要在php中启用LDAP。ini文件。取消这条线:
extension=php_ldap.dll
#2
7
Make sure that the LDAP extension is installed on your server. There should be a package you need to install. I believe its:
确保LDAP扩展安装在服务器上。应该有一个您需要安装的包。我相信它:
sudo apt-get install php5-ldap
sudo apt-get安装php5-ldap
You may also want to check the installation guide. You might need to add another two DLLs libeay32.dll and ssleay32.dll
.
您可能还想检查安装指南。您可能需要再添加两个dll libeay32。dll和ssleay32.dll。
#1
10
You need to enable LDAP in your php.ini file. Uncomment this line:
您需要在php中启用LDAP。ini文件。取消这条线:
extension=php_ldap.dll
#2
7
Make sure that the LDAP extension is installed on your server. There should be a package you need to install. I believe its:
确保LDAP扩展安装在服务器上。应该有一个您需要安装的包。我相信它:
sudo apt-get install php5-ldap
sudo apt-get安装php5-ldap
You may also want to check the installation guide. You might need to add another two DLLs libeay32.dll and ssleay32.dll
.
您可能还想检查安装指南。您可能需要再添加两个dll libeay32。dll和ssleay32.dll。