How to enable curl in xampp?
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 (;)
Aakash Chakravarthy
Just a self learned young web developer from India
Updated on July 08, 2022Comments
-
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 almost 14 yearswhere to find that file ? in which folder
-
Priya Narayanan about 13 yearse.g. c:\xampp\php\php.ini
-
niczak almost 11 yearsWorked 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 about 10 years+1, Beautifully put-up.
-
minhaz1 about 9 yearsNot sure about linux, but
extension=curl.so
is not in the php.ini file for XAMPP on Mac OS X. -
andika_kurniawan about 9 yearsI can't find php.ini
-
Esteban Cacavelos about 9 years/Applications/XAMPP/xamppfiles/etc/php.ini ?
-
YakovL over 6 yearsUnless 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 about 6 yearsPost 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 over 5 yearscannot find extension=php_curl.dll in php.ini filr
-
MindRoasterMir about 5 yearsin latest versions it is like extension=curl and it is already enabled. thanks
-
Fethi over 2 years@MindRoasterMir yet the error still occurs