Enable cURL on PHP7 windows10 64 bit Apache 2.4
Here are the steps from obtaining PHP to enabling cURL:
- Download PHP (these steps tested with 7.1)
- Add PHP folder to PATH environment variable
- Update php.ini file with absolute path for extension directory and uncomment php_curl.dll and php_openssl.dll extensions
- Update httpd.conf (Apache config file) to load php7apache2_4.dll module in PHP folder and set PHPIniDir to PHP directory
- Copy libeay32.dll libssh2.dll and ssleay32.dll into apache/bin (replace existing)
- Restart Apache.
I fixed it by:
1)Edit php.ini file Enable( uncomment) php_curl.dll and php_openssl.dll extensions
2)go to c:/php7/
Copy libssh2.dll into c:/apache24/bin folder.
3) test by: curl_test.php
<?php// Script to test if the CURL extension is installed on this server // Define function to test function _is_curl_installed() {if (in_array ('curl', get_loaded_extensions())) { return true;}else { return false;}}// Ouput text to user based on test if (_is_curl_installed()) { echo "cURL is <span style=\"color:blue\">installed</span> on this server"; } else { echo "cURL is NOT <span style=\"color:red\">installed</span> on this server";}?>
in PHP 7.2.2 Windows 10 Apache 2.4 After a while of searching for answers why the cURL library doesn´t load, i just copied libssh2.dll from \php to \Apache24\bin and everything started to work just fine