无法启用PHP LDAP,即使我已经编辑php.ini并php_ldap.dll是在正确的地方? [英] Unable to enable PHP LDAP even though I have edited php.ini and php_ldap.dll is in the right place?

查看:978
本文介绍了无法启用PHP LDAP,即使我已经编辑php.ini并php_ldap.dll是在正确的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有工作WAMP安装,现在相当长一段时间启用LDAP和一切都很顺利。现在,虽然我要成立另一台机器上,由于某种原因,我不能支持LDAP。

我检查的phpinfo()和LDAP部分的输出是不存在的。我编辑的php.ini 来取消该行:

 扩展= p​​hp_ldap.dll

我还检查了正在搜索的扩展文件路径和文件 php_ldap.dll 是在正确的地方。

我的的我编辑的php.ini 文件,因为我查过被这些文件路径正确的phpinfo(),而且我能够成功地启用/禁用其他扩展。

我已每次更改后重新启动Apache的。

虽然谷歌搜索这一点,我发现的唯一的解决方案是那些上面,加一或两次提到编辑Windows PATH 变量包含路径的php.ini ?尝试它,即使它没有任何意义,我(因为我已经知道的php.ini 被解析)。我还检查我的previous安装在另一台机器上,从我可以看到我从来没有添加任何PHP目录到 PATH 的机器

编辑与完整的答案

下面弗兰克的回答使我解决,所以我想我现在想巩固一切。

要启用WAMP服务器上LDAP支持:


  1. 取消注释扩展= p​​hp_ldap.dll 的php.ini

  2. 重要提示:请确保您正在编辑正确的的php.ini 通过检查的输出的phpinfo( )

  3. 检查您的扩展目录的位置的php.ini 文件

  4. 检查 php_ldap.dll 位于该目录

  5. 的步骤我错过)找到文件的libeay32.dll ssleay32.dll 键,将其目录添加到Windows PATH

  6. 重新启动Apache的。如果LDAP启用将有一个关于它的部分输出的phpinfo()


解决方案

有这里有一些提示:<一href=\"http://php.net/manual/en/ldap.installation.php\">http://php.net/manual/en/ldap.installation.php 。注意:您需要添加其他两个DLL 的libeay32.dll ssleay32.dll 。您可能还需要与编译 - 与LDAP的

I've been working with a WAMP install for quite a while now with LDAP enabled and everything is going smoothly. Now though I have to set up another machine and for some reason I can't enable LDAP.

I checked the output of phpinfo() and the LDAP section isn't there. I edited php.ini to uncomment the line:

extension = php_ldap.dll

I also checked the filepath being searched for extensions and the file php_ldap.dll is in the right place.

I'm positive I'm editing the right php.ini file since I checked the filepath being shown by phpinfo(), and also I am able to successfully enable/disable other extensions.

I have rebooted Apache after every change made.

While Googling this, the only solutions I found were those above, plus one or two mentions of editing the Windows PATH variable to include the path to php.ini? Tried it even though it didn't make sense to me (as I already know php.ini is being parsed). I also checked my previous install on the other machine and from what I can see I never added any PHP directories to the PATH on that machine

Edit with complete answer

Frank's answer below led me to the solution so I thought I'd consolidate everything now.

To Enable LDAP Support on a WAMP server:

  1. Uncomment extension = php_ldap.dll in php.ini
  2. IMPORTANT: Make sure that you're editing the right php.ini by checking the output of phpinfo()
  3. Check the php.ini file for the location of your extensions directory
  4. Check that php_ldap.dll is located in that directory
  5. (THE STEP I MISSED) Find the files libeay32.dll and ssleay32.dll and add their directory to the Windows PATH
  6. Reboot Apache. If LDAP is enabled there will be a section about it in the output of phpinfo()

解决方案

There are a few hints here: http://php.net/manual/en/ldap.installation.php . Note you need to add two other DLLs libeay32.dll and ssleay32.dll. You may also need to compile with --with-ldap

这篇关于无法启用PHP LDAP,即使我已经编辑php.ini并php_ldap.dll是在正确的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆