无法启用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?
问题描述
我已经有工作WAMP安装,现在相当长一段时间启用LDAP和一切都很顺利。现在,虽然我要成立另一台机器上,由于某种原因,我不能支持LDAP。
我检查的phpinfo()
和LDAP部分的输出是不存在的。我编辑的php.ini
来取消该行:
扩展= php_ldap.dll
我还检查了正在搜索的扩展文件路径和文件 php_ldap.dll
是在正确的地方。
我的正的我编辑的php.ini
文件,因为我查过被这些文件路径正确的phpinfo()
,而且我能够成功地启用/禁用其他扩展。
我已每次更改后重新启动Apache的。
虽然谷歌搜索这一点,我发现的唯一的解决方案是那些上面,加一或两次提到编辑Windows PATH
变量包含路径的php.ini
?尝试它,即使它没有任何意义,我(因为我已经知道的php.ini
被解析)。我还检查我的previous安装在另一台机器上,从我可以看到我从来没有添加任何PHP目录到 PATH
的机器
编辑与完整的答案
下面弗兰克的回答使我解决,所以我想我现在想巩固一切。
要启用WAMP服务器上LDAP支持:
- 取消注释
扩展= php_ldap.dll
在的php.ini
- 重要提示:请确保您正在编辑正确的
的php.ini
通过检查的输出的phpinfo( )
- 检查您的扩展目录的位置
的php.ini
文件 - 检查
php_ldap.dll
位于该目录 - (的步骤我错过)找到文件
的libeay32.dll
和ssleay32.dll
键,将其目录添加到Windows PATH - 重新启动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:
- Uncomment
extension = php_ldap.dll
inphp.ini
- IMPORTANT: Make sure that you're editing the right
php.ini
by checking the output ofphpinfo()
- Check the
php.ini
file for the location of your extensions directory - Check that
php_ldap.dll
is located in that directory - (THE STEP I MISSED) Find the files
libeay32.dll
andssleay32.dll
and add their directory to the Windows PATH - 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屋!