curl64-bitwindows-10php-7apache2.4

Enable cURL on PHP7 windows10 64 bit Apache 2.4


I am using Windows10 64 bit Apache 2.4.25 (Win64) PHP 7.1.0-Win32-VC14-x64

when i try calling curl_init() function, i get an error saying "Call to undefined function curl_init()" tried following

Any help much appreciated.


Solution

  • Here are the steps from obtaining PHP to enabling cURL:

    1. Download PHP (these steps tested with 7.1)
    2. Add PHP folder to PATH environment variable
    3. Update php.ini file with absolute path for extension directory and uncomment php_curl.dll and php_openssl.dll extensions
    4. Update httpd.conf (Apache config file) to load php7apache2_4.dll module in PHP folder and set PHPIniDir to PHP directory
    5. Copy libeay32.dll libssh2.dll and ssleay32.dll into apache/bin (replace existing)
    6. Restart Apache.