问题描述
我有带WAMP服务器的Windows 10(Apache 2.4.9,PHP 5.5.29 VC11 x64和MySQL)。一切正常,但现在我将使用curl扩展。
I have Windows 10 with WAMP server (Apache 2.4.9, PHP 5.5.29 VC11 x64, e MySQL). All works fine, but now I will use curl extension.
我进入 C:\wamp\bin\php\php5 .5.29\phpForApache.ini
(来自网络服务器配置),然后从 extension = php_curl.dll
I go into C:\wamp\bin\php\php5.5.29\phpForApache.ini
(from webserver configuration) and remove the comment from extension=php_curl.dll
重新加载apache服务器,并在 error_log
中,我有
reload apache server and in error_log
I have
行中未知
1°try :我在系统var路径中添加了 C:/wamp/bin/php/php5.5.29/ext/; c:/wamp/bin/php/php5.5.29 /
1° try: I added in system var PATH: C:/wamp/bin/php/php5.5.29/ext/;c:/wamp/bin/php/php5.5.29/
2°尝试:我已经重新下载文件 php-5.5.29-Win32-VC11-x64.zip
并替换了 php_curl.dll
2° try: I have re-dowload the file php-5.5.29-Win32-VC11-x64.zip
and replaced the php_curl.dll
但我总是得到相同的结果:
index.php
But I have always the same result:index.php
phperror_log:
推荐答案
这些步骤对我有用:
- 将主php文件夹添加到Windows中的Path Env变量中(因此
libeay32.dll和ssleay32.dll可通过路径访问。 ..有些人
将这些文件复制到Windows / System32以使其可访问路径,但是
并不是解决问题的真正优雅方法) -
将Apache bin文件夹添加到Windows中的Path Env变量中
- Add the main php folder onto the Path Env variable in Windows (solibeay32.dll and ssleay32.dll are path-accessible ... some peoplecopy these to Windows/System32 to make them path-accessible but thatisn't really elegant way to solve issue)
Add the Apache bin folder onto the Path Env variable in Windows
将文件libssh2.dll从php文件夹复制到apache的bin
文件夹(Apache似乎需要此文件才能使php的curl在Windows中工作)
Copy the file libssh2.dll from the php folder to apache's binfolder (Apache seems to need this for php's curl to work in Windows)
这篇关于PHP警告:PHP启动:无法加载动态库php_curl.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!