How do I install cURL on Windows?
Solution 1:
Use the following steps to install curl:
Open https://curl.haxx.se/dlwiz?type=bin in a browser.
Select your operating system in the dropdown box: either Windows /Win32 or Win 64. Click Select!
For Win 32, choose whether you will use curl in a Windows Command Prompt (Generic) or in a Cygwin terminal (cygwin). For Win 64, choose whether you will use curl in a Windows Command Prompt (Generic) or MinGW (MinGW64). Click Select!
If required, choose your Windows operating system. Finish.
Click Download for the version which has SSL enabled or disabled
Open the downloaded zip file. Extract the files to an easy-to-find place, such as C:\Program Files.
Testing curl
Open up the Windows Command Prompt terminal. (From the Start menu, click Run, then type cmd.)
Set the path to include the directory where you put curl.exe. For example, if you put it in C:\Program Files\curl, then you would type the following command: set path=%path%;"c:\Program Files\curl"
NOTE: You can also directly copy the curl.exe file any existing path in your path
- Type curl. You should see the following message: curl: try 'curl –help' or 'curl –message' for more information This means that curl is installed and the path is correct.
Solution 2:
You're probably mistaking what PHP.ini you need to edit. first, add a PHPinfo(); to a info.php, and run it from your browser.
Write down the PHP ini directory path you see in the variables list now! You will probably notice that it's different from your PHP-CLI ini file.
Enable the extension
You're done :-)
Solution 3:
I'm using XAMPP, in which there are several php.ini files.
You can find the line in the php.ini files:
;extension=php_curl.dll
Please remove ;
at the beginning of this line. And you may need to restart apache server.