PHP无法加载php_curl.dll扩展 [英] PHP unable to load php_curl.dll extension

查看:110
本文介绍了PHP无法加载php_curl.dll扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我昨天的帖子后续跟进(使用PHP启用cURL

Follow-up from my post yesterday (Enabling cURL with PHP)

问题是PHP无法加载php_curl.dll。我已经尝试了几个步骤,包括取消注释 extension = php_curl.dll ,确保依赖关系 libeay32.dll ssleay32.dll 在路径中的eixst,重新下载php_curl.dll,替换旧的,最后将文件复制到我的System32文件夹。

The problem is that PHP isn't able to load php_curl.dll. I've tried several steps including uncommenting extension=php_curl.dll, making sure the dependencies libeay32.dll and ssleay32.dll eixst in the path, re-downloading php_curl.dll, replacing the old one, and lastly copying the file into my System32 folder.

我使用Apache 2.2和PHP 5.4.14。我安装了他们各自的包;我不使用XAMP或WAMP。我使用Windows 7 64位。

I'm using Apache 2.2 and PHP 5.4.14. I installed both using their individual packages; I'm not using XAMP or WAMP. I'm using Windows 7 64-bit.

任何帮助都会感激。

推荐答案

libeay32.dll ssleay32.dll 必须能够路径访问 php_curl.dll 加载成功。

libeay32.dll and ssleay32.dll have to be path-accessible for php_curl.dll loading to succeed.

但将其复制到Apache的 ServerRoot ,Apache的 \bin\ ,窗口 \System32 \ ,甚至更糟糕的是进入Windows主目录是一个坏的黑客,甚至可能无法使用较新的PHP版本。

But copying them into Apache's ServerRoot, Apache's \bin\, Window's \System32\, or even worse into the Windows main directory is a bad hack and may not even work with newer PHP versions.

正确的方法是将PHP路径添加到Windows Path 变量。在控制面板 - > System 点击高级系统设置,然后使用环境变量按钮。在系统变量下,您可以找到路径变量。编辑它,并将; C:\PHP 附加到它 - 或者PHP文件夹的路径。然后完全停止Apache并再次启动(一个简单的重新启动可能不够)。

The right way to do it is to add the PHP path to the Windows Path variable. In Control Panel -> System click on Advanced System Settings and use the button Environment Variables. Under System Variables you will find the Path variable. Edit it and append ;C:\PHP to it - or whatever the path to your PHP folder is. Then fully stop Apache and start it again (a simple restart might not be enough).

这篇关于PHP无法加载php_curl.dll扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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