( ! ) Fatal error: Call to undefined function ldap_connect() in D:\Program Files\wamp\www\enduser_fe

来源:互联网 发布:seo招聘信息 编辑:程序博客网 时间:2024/05/20 00:13

部署一个YII项目时遇到这个问题,


( ! ) Fatal error: Call to undefined function ldap_connect() in D:\Program Files\wamp\www\enduser_feedback\trunk\enduserfeedback\feedback\protected\components\adLDAP.php on line 125


按照下面的步骤还是出现这个错误:

If you are a Windows Users: 
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 foll. line: extension=php_ldap.dll
  • 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!

原文链接如下:

http://stackoverflow.com/questions/16864306/fatal-error-call-to-undefined-function-ldap-connect

再根据这个链接(http://www.php.net/manual/en/ldap.installation.php)上面的提示,拷了些DDL文件到system32下还是不行。后面问了同事,他让我在页面输出这个:

<?php 
echo phpinfo(); 
?>

看看页面有没有LDAP模块,发现没有,他看了看这行信息:

Loaded Configuration FileD:\Program Files\wamp\bin\apache\apache2.4.4\bin\php.ini发现程序执行的配置文件是在Apache下的,而我修改的是这个目录下的:

D:\Program Files\wamp\bin\php\php5.4.16

写下来给大家做个参考。


0 0
原创粉丝点击