How to enable curl in xampp?

PhpCurlXampp

Php Problem Overview


How to enable curl in xampp ?

My PHP twitter application needs curl function. But it is not enabled in XAMPP. how to enable it. I found no options for doing that.

Php Solutions


Solution 1 - Php

You have to modify the php.ini files in your xampp folder. Three files in three different places need to be changed.

Follow the following steps to enable curl library with XAMPP in Windows:

Step 1:

Browse and open the following 3 files

C:\Program Files\xampp\apache\bin\php.ini
C:\Program Files\xampp\php\php.ini
C:\Program Files\xampp\php\php4\php.ini

Step 2:

Uncomment the following line in your php.ini file by removing the semicolon (;).

;extension=php_curl.dll

After that it will look something like something below-

extension=php_curl.dll

Step 3:

Restart your Apache server.

Step 4:

Check your phpinfo() to see whether curl has properly enabled or not.

Enjoy using curl() library.

Solution 2 - Php

It should be available in php.ini file. You need to un-comment the line for curl extension:

  ;extension=php_curl.dll
  ^----- remove semi-colon

Solution 3 - Php

In XAMPP installation directory, open %XAMPP_HOME%/php/php.ini file. Uncomment the following line: extension=php_curl.dll

PS: If that doesn't work then check whether %XAMPP_HOME%/php/ext/php_curl.dll file exist or not.

Solution 4 - Php

  1. C:\Program Files\xampp\php\php.ini

  2. Uncomment the following line on your php.ini file by removing the semicolon.

> ;extension=php_curl.dll

  1. Restart your apache server.

Solution 5 - Php

First, make sure you have libcurl (see: http://curl.haxx.se) installed. Then make sure your copy of PHP has been compiled with the --with-curl[=DIR] flag. For more info see:

If XAMPP comes pre-compiled with cURL you may just need to enable the extension in your php.ini file (usually by removing a semicolon at the start of the line which includes the extension).

Solution 6 - Php

You can add any extension (in Wamp and Xampp servers) by removing the semi-colon (;)

Solution 7 - Php

For XAMPP on MACOS or Linux, remove the semicolon in php.ini file after extension=curl.so

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAakash ChakravarthyView Question on Stackoverflow
Solution 1 - PhpAnjumanView Answer on Stackoverflow
Solution 2 - PhpSarfrazView Answer on Stackoverflow
Solution 3 - PhpmohitsoniView Answer on Stackoverflow
Solution 4 - PhpwebvitalyView Answer on Stackoverflow
Solution 5 - PhpSimonView Answer on Stackoverflow
Solution 6 - PhpVinicius MartinsonView Answer on Stackoverflow
Solution 7 - PhpEsteban CacavelosView Answer on Stackoverflow