问题
Im trying to use HybridAuth in one of my projects, the error message im getting is
Original error message: Hybridauth Library needs the CURL PHP extension.
Even though i have enabled cURL in my php.ini
extension=php_curl.dll
here is a screenshot of my phpinfo()
What else i have to do in-order to enable the cURL extension, the related php_curl.dll
is also present in the ext
dir
Message that i get when i restart the apache server
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
回答1:
You have to add PHP install path to windows environment path. For example it you install php on C:\PHP
, add both C:\PHP
and C:\PHP\ext
to windows path. Some how Apache cannot find curl dependencies libeay32.dll, ssleay32.dll and libssh2.dll
回答2:
Try this:
if (in_array ('curl', get_loaded_extensions())) {
echo "cURL is installed on this server";
}
else {
echo "cURL is not installed on this server";
}
See, if that works.
回答3:
so it turns out i need a fixed version of curl which i could not find for PHP_5.6.4, so i downgraded to PHP Version 5.4.3
and then downloaded Fixed curl extension(dont know what it is) from here replaced the original php_curl.dll
with the one i downloaded and voila it worked.
The following SO post helped me fix the problem
PHP cURL not working - WAMP on Windows 7 64 bit
P.S please feel free to edit the answer as i dont know the exact reason why its working now and why it was not earlier...
回答4:
get back the original php_curl.dll
file ( from the zip file you downlaoded from php.net )
copy libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll to Windows\system32 folder
this worked with me i have php 5.6.6 x64 ts with apache 2.4.10 in windows 8.1
回答5:
You have to add the PHP install path to the Windows environment path. For example, if you install PHP on C:\PHP
, add both C:\PHP
and C:\PHP\ext
to the Windows path. Somehow, Apache cannot find curl dependencies libeay32.dll
, ssleay32.dll
and libssh2.dll
.
来源:https://stackoverflow.com/questions/27776139/enable-curl-on-windows-for-php5-6-4