There appear to be a lot of misguided people on the intarwebs claiming all sorts of varying things you have to do to get CURL to work on a Windows-based XAMPP install. I’d like to clear them all up here and now.
Using CURL in XAMPP
It’s really quite simple - uncomment
extension=php_curl.dll in your
php.ini file, then restart Apache1.
A lot of confusion seems to stem from the fact that there are multiple
php.ini files in a standard XAMPP install. This really isn’t as confusing as you’d think it would be, assuming you - and I know I’m going out on a limb here - read the documentation.
There’s a straight-forward XAMPP FAQ Entry about their php.ini stucture. For those looking for the easy fix, ignore everything but the /apache/bin/php.ini file. That’s the only one that counts, regardless of which PHP version you’re currently using.
What about all the .dll files you need? Well, you don’t need them. Everything you need to run CURL on a XAMPP install is included in the download. Stop downloading extra crap and sticking it all over your system. XAMPP knows what it needs, where it’s at, and how to use it. End of story.
This is all based on the XAMPP Basic Package for Windows, version 1.6.1, released on 4/18/2007. YMMV.
Update for XAMPP 1.7.x: As of the 1.7.0 release, the php.ini file is found in /xampp/php. When in doubt, consult the FAQ entry linked above for help. Thanks to several commenters for pointing out this change!
- Restarting Apache is required on both Windows and Linux whenever you make configuration changes. ↩