Windows – Apache Httpd PHP 7 Curl Setup

apache-2.4curlPHPwindows

I have been trying to enable curl on PHP 7.1.4 which is running off of Apache HTTPD 2.4. The steps I have taken so far are:

Uncomment extension=php_curl.dll
Ensure that the ext path is set correctly (I have tested this by enabling openssl which works)
Adding the PHP root folder to my PATH environment variable
Fully stopped the server and started again

Although the function var_dump(extension_loaded('curl')); is false and curl is not listed under phpinfo();

I have run PHP –ri curl and it states: cURL support => enabled cURL Information => 7.53.1

I have also run deplister on the curl dll and it states that all lines are ok.

Please could you advise me of any other debugging steps or silly mistakes that I could have made (I feel that I have spent too many hours looking at this problem and a fresh set of eyes…)

More system info: Compiler MSVC14 (Visual C++ 2015)
Architecture x64
Windows 7 platform

Best Answer

This saved my life (from https://www.php.net/manual/en/curl.installation.php)

Upgrading to php 7.1.6 on Apache 2.4 32bit version Windows 7 x64

this curl implementation works:

  1. C:/(path to php folder)/php.ini enable extension=php_curl.dll

libeay32.dll, ssleay32.dll, libssh2.dll find directly in php7 folder

  1. add this to Apache/conf/httpd.conf

    load curl and open ssl libraries LoadFile "C:/(path to php folder)/libeay32.dll" LoadFile "C:/(path to php folder)/ssleay32.dll"

LoadFile "C:/(path to php folder)/libssh2.dll"

If you don't find some of these DLLs, try downloaidng a non-TS version of php and copy them from that folder.

Related Topic