How to enable curl in xampp?

166,177

Solution 1

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

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

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

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

3) Restart your apache server.

Solution 5

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

Share:
166,177
Aakash Chakravarthy
Author by

Aakash Chakravarthy

Just a self learned young web developer from India

Updated on July 08, 2022

Comments

  • Aakash Chakravarthy
    Aakash Chakravarthy almost 2 years

    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.

  • Aakash Chakravarthy
    Aakash Chakravarthy almost 14 years
    where to find that file ? in which folder
  • Priya Narayanan
    Priya Narayanan about 13 years
    e.g. c:\xampp\php\php.ini
  • niczak
    niczak almost 11 years
    Worked great! The current version of Xampp only uses a single php.ini (phew!) which is in ./php/php.ini so I only needed to make the update in one spot.
  • Shankar Narayana Damodaran
    Shankar Narayana Damodaran about 10 years
    +1, Beautifully put-up.
  • minhaz1
    minhaz1 about 9 years
    Not sure about linux, but extension=curl.so is not in the php.ini file for XAMPP on Mac OS X.
  • andika_kurniawan
    andika_kurniawan about 9 years
    I can't find php.ini
  • Esteban Cacavelos
    Esteban Cacavelos about 9 years
    /Applications/XAMPP/xamppfiles/etc/php.ini ?
  • YakovL
    YakovL over 6 years
    Unless you specify where to remove the semi-colon, this is hardly helpful to most of users. I'm marking this "Recommended Deletion" from the review panel but once you update your answer other reviewers probably won't do that. Best regards
  • Mangesh Sathe
    Mangesh Sathe about 6 years
    Post is old now, XAMPP Version: 5.6.30 has only one \xampp\php\php.ini file, apache\bin or php\php4\ is not available
  • Rajbir Shienh
    Rajbir Shienh over 5 years
    cannot find extension=php_curl.dll in php.ini filr
  • MindRoasterMir
    MindRoasterMir about 5 years
    in latest versions it is like extension=curl and it is already enabled. thanks
  • Fethi
    Fethi over 2 years
    @MindRoasterMir yet the error still occurs