Enable CURL on Windows For PHP5.6.4

雨燕双飞 提交于 2019-12-01 18:46:12

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

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.

John x

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

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

pablotandil

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!