为 PHP5.6.4 在 Windows 上启用 CURL
Enable CURL on Windows For PHP5.6.4
我试图在我的一个项目中使用 HybridAuth,我收到的错误消息是
Original error message: Hybridauth Library needs the CURL PHP extension.
尽管我在 php.ini
中启用了 cURL
分机=php_curl.dll
这是我的 phpinfo()
的屏幕截图
我还需要做什么 in-order 才能启用 cURL 扩展,相关的 php_curl.dll
也存在于 ext
目录中
重启 Apache 服务器时收到的消息
C:\Apache24\bin>httpd -k restart AH00558: httpd: Could not reliably
determine the server's fully qualified domain name, using
fe80::a02e:1c05:c6ad:9332. Set the 'ServerName' directive globally to
suppress this message
试试这个:
if (in_array ('curl', get_loaded_extensions())) {
echo "cURL is installed on this server";
}
else {
echo "cURL is not installed on this server";
}
看看,是否有效。
所以我需要一个固定版本的 curl,我找不到 PHP_5.6.4,所以我降级到 PHP Version 5.4.3
然后下载了 Fixed curl extension (不知道它是什么)来自 here 将原来的 php_curl.dll
替换为我下载的那个,瞧,它起作用了。
下面的SOpost帮我解决了问题
PHP cURL not working - WAMP on Windows 7 64 bit
P.S 请随时编辑答案,因为我不知道它现在工作的确切原因以及为什么它不早......
取回原始 php_curl.dll
文件(从您从 php.net 下载的 zip 文件)
将libssh2.dll、php_curl.dll、ssleay32.dll、libeay32.dll复制到Windows\system32文件夹
这对我有用 我在 windows 8.1
中有 php 5.6.6 x64 ts 和 apache 2.4.10
您必须将 PHP 安装路径添加到 windows 环境路径。例如,如果您在 C:\PHP
上安装 php,将 C:\PHP
和 C:\PHP\ext
添加到 windows 路径。 Apache 无法找到 curl 依赖项 libeay32.dll、ssleay32.dll 和 libssh2.dll
的一些原因
您必须将 PHP 安装路径添加到 Windows 环境路径。例如,如果您在 C:\PHP
上安装 PHP,请将 C:\PHP
和 C:\PHP\ext
添加到 Windows 路径。不知何故,Apache 无法找到 curl 依赖项 libeay32.dll
、ssleay32.dll
和 libssh2.dll
.
我试图在我的一个项目中使用 HybridAuth,我收到的错误消息是
Original error message: Hybridauth Library needs the CURL PHP extension.
尽管我在 php.ini
中启用了 cURL
分机=php_curl.dll
这是我的 phpinfo()
我还需要做什么 in-order 才能启用 cURL 扩展,相关的 php_curl.dll
也存在于 ext
目录中
重启 Apache 服务器时收到的消息
C:\Apache24\bin>httpd -k restart AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::a02e:1c05:c6ad:9332. Set the 'ServerName' directive globally to suppress this message
试试这个:
if (in_array ('curl', get_loaded_extensions())) {
echo "cURL is installed on this server";
}
else {
echo "cURL is not installed on this server";
}
看看,是否有效。
所以我需要一个固定版本的 curl,我找不到 PHP_5.6.4,所以我降级到 PHP Version 5.4.3
然后下载了 Fixed curl extension (不知道它是什么)来自 here 将原来的 php_curl.dll
替换为我下载的那个,瞧,它起作用了。
下面的SOpost帮我解决了问题
PHP cURL not working - WAMP on Windows 7 64 bit
P.S 请随时编辑答案,因为我不知道它现在工作的确切原因以及为什么它不早......
取回原始 php_curl.dll
文件(从您从 php.net 下载的 zip 文件)
将libssh2.dll、php_curl.dll、ssleay32.dll、libeay32.dll复制到Windows\system32文件夹
这对我有用 我在 windows 8.1
中有 php 5.6.6 x64 ts 和 apache 2.4.10您必须将 PHP 安装路径添加到 windows 环境路径。例如,如果您在 C:\PHP
上安装 php,将 C:\PHP
和 C:\PHP\ext
添加到 windows 路径。 Apache 无法找到 curl 依赖项 libeay32.dll、ssleay32.dll 和 libssh2.dll
您必须将 PHP 安装路径添加到 Windows 环境路径。例如,如果您在 C:\PHP
上安装 PHP,请将 C:\PHP
和 C:\PHP\ext
添加到 Windows 路径。不知何故,Apache 无法找到 curl 依赖项 libeay32.dll
、ssleay32.dll
和 libssh2.dll
.