conan_flow
conan_flow

Reputation: 23

Install PHP Curl on Windows and Using it on Laravel 5.4

I am using Laravel 5.4 on Windows 10. How to install PHP Curl on Windows and using it on Laravel?

Upvotes: 0

Views: 5161

Answers (2)

Gondaliya Darshan
Gondaliya Darshan

Reputation: 41

Use the following steps to install curl:

  1. Open https://curl.haxx.se/dlwiz?type=bin in a browser.
  2. Select your operating system in the dropdown box: either Windows /Win32 or Win 64. Click Select!
  3. 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!
  4. If required, choose your Windows operating system. Finish.
  5. Click Download for the version which has SSL enabled or disabled
  6. Open the downloaded zip file. Extract the files to an easy-to-find place, such as C:\Program Files.

Testing curl

  1. Open up the Windows Command Prompt terminal. (From the Start menu, click Run, then type cmd.)
  2. 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

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

Upvotes: 0

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111829

Usually all you need is finding php.ini, find line with curl for example:

;extension=php_curl.dll

remove ; from the beginning of the line so it should look like this:

extension=php_curl.dll

Restart your webserver. Extension should be then available.

Be aware you might have multiple php.ini files (one for command line, one for web server), so make sure you are editing the correct file.

Upvotes: 1

Related Questions