Windows上的Apache找不到php扩展名 [英] Apache on Windows cant find php extensions

查看:178
本文介绍了Windows上的Apache找不到php扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows Server 2012上安装了Apache 2.4和php.

I have Apache 2.4 and php installed on Windows Server 2012.

我正在尝试加载php_ldap.dll扩展名.

Im trying to load the php_ldap.dll extension.

这是我所做的:

php.ini中,我设置了以下内容:

In php.ini I set the following:

extension_dir = "C:\php\ext"

extension=php_ldap.dll

然后,我确定该路径下的dll是可用的,是的,它在那里:

Then, I made sure the dll was available at that path, yep, it's there:

phpinfo表示我正在编辑正确的php.ini,并且extension_dir已更新.

phpinfo shows that I am editing the correct php.ini and the extension_dir is updated.

但是,当我启动Apache时,未加载php_ldap.dll.

However, when I start Apache, php_ldap.dll is not loaded.

Apache日志显示以下警告:

The Apache logs show this warning:

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_ldap.dll' - The specified module could not be found.\r\n in Unknown on line 0

我该如何解决?

另外,\\是什么?为什么将"\"加倍,这是问题所在吗?

Also, what's with the \\? Why is it doubling the "\" and is that the problem?

推荐答案

我最好的猜测是系统中缺少所需的库. php_ldap扩展名要求同时在系统上安装libeay32.dllssleay32.dll:

My best guess would be that a needed library is missing from your system. The php_ldap extensions requires that both libeay32.dll and ssleay32.dll is installed on the system:

ldap安装手册中:

注意:Win32用户注意

Note: Note to Win32 Users

为了使此扩展名起作用,必须有一些DLL文件. 可用于Windows系统PATH.有关如何做的信息 为此,请参阅标题为如何将我的PHP目录添加到PATH的常见问题解答". 在Windows上."尽管将DLL文件从PHP文件夹复制到 Windows系统目录也可以工作(因为系统目录是 默认情况下,在系统的PATH中),不建议这样做.这 扩展名要求以下文件位于PATH中:libeay32.dll 和PHP 4.3.0之前的ssleay32.dll版本另外需要 libsasl.dll.

In order for this extension to work, there are DLL files that must be available to the Windows system PATH. For information on how to do this, see the FAQ entitled "How do I add my PHP directory to the PATH on Windows". Although copying DLL files from the PHP folder into the Windows system directory also works (because the system directory is by default in the system's PATH), this is not recommended. This extension requires the following files to be in the PATH: libeay32.dll and ssleay32.dll Versions before PHP 4.3.0 additionally require libsasl.dll.

这篇关于Windows上的Apache找不到php扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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