5

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()

enter image description here

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

enter image description here

John x
  • 4,031
  • 8
  • 42
  • 67
  • Are you using MAMP or something? Because it caches the php.ini file somewhere else rather than in original directory. – Abhinav Gauniyal Jan 05 '15 at 09:01
  • Restart the server and check – Kiren S Jan 05 '15 at 09:19
  • Clear your browsing history & cache and reload your server. You can visit http://curl.haxx.se/libcurl/php/install.html and http://php.net/manual/en/install.windows.extensions.php for installation. – Gaurav Dave Jan 05 '15 at 09:27
  • @AbhinavGauniyal i have separately installed the apache, php and mysql – John x Jan 05 '15 at 09:32
  • @KirenSiva i have checked after restarting the apache server – John x Jan 05 '15 at 09:32
  • @GauravDave nope same old error message... tried clearing the browser cache – John x Jan 05 '15 at 09:34
  • @Johnx , try searching the phpinfo() page only , it might have some information on curl if it has been enabled. – Abhinav Gauniyal Jan 05 '15 at 09:35
  • When you restart, does it give any error/warning (like: apache is already running), else you could install xampp, will makes you're life easier. – Gaurav Dave Jan 05 '15 at 09:35
  • @GauravDave nope, i'll update the message apache gives, but that is i think related to some domain name config...just a sec – John x Jan 05 '15 at 09:42
  • @GauravDave plz check the edit in question – John x Jan 05 '15 at 09:43
  • @Johnx , It should be related to your php configuration , see if your phpinfo contains something like this : http://i.imgur.com/RpfUji4.png – Abhinav Gauniyal Jan 05 '15 at 09:43
  • @Johnx Edit you're apache2.conf file and add ServerName localhost in that. – Gaurav Dave Jan 05 '15 at 09:46
  • @AbhinavGauniyal I have added the curl part of my phpinfo to the question plz have a look i dont have anything like your config i.e a separate cURL section... – John x Jan 05 '15 at 09:48
  • @GauravDave tnx added the servername and the warning went away, but the original problem still persists :( – John x Jan 05 '15 at 09:52
  • Then it isn't yet added. Are you sure you have uncommented ( removed ; in front of ) php_curl.dll line? And on x64 machine? : have you seen this ques : http://stackoverflow.com/questions/25044010/running-curl-on-64-bit-windows – Abhinav Gauniyal Jan 05 '15 at 09:55
  • @AbhinavGauniyal plz have a look at last screenshot i have added in the question edit – John x Jan 05 '15 at 09:59
  • Paste the Output of a sample curl request. Try the above link i have commented. And x86 or x64 version ? There are good answers here too : http://stackoverflow.com/questions/181082/how-do-i-install-curl-on-windows – Abhinav Gauniyal Jan 05 '15 at 10:01
  • 1
    eventually i end up downgrading my php version, thanks everybody for the support.. – John x Jan 05 '15 at 13:31

5 Answers5

10

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

James
  • 13,571
  • 6
  • 61
  • 83
1

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.

Gaurav Dave
  • 6,838
  • 9
  • 25
  • 39
1

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...

Community
  • 1
  • 1
John x
  • 4,031
  • 8
  • 42
  • 67
1

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

Robert
  • 2,342
  • 2
  • 24
  • 41
0

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.

Benjamin W.
  • 46,058
  • 19
  • 106
  • 116