Using CURL in XAMPP

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!

  1. Restarting Apache is required on both Windows and Linux whenever you make configuration changes. []
Posted in Uncategorized | Tagged , , , , , , , , , , , | 57 Comments

57 Responses to Using CURL in XAMPP

  1. Steffi says:

    Thanks a Ton!

  2. Mike says:

    Thank you sooooo much! I have been searching off and on for weeks now trying to find a good tutorial on how to install curl on my xampp setup because I read somewhere that it isn’t installed…

    Then I come to this article, and less than a minute later I am testing things on my local development environment that I thought I was going to have to wait until the live version to test!

    Woohoo! Thanks again, you just saved me a whole lot of development time.

    Mike

  3. Swapnendu Das says:

    I can’t find php.ini file in apache/bin folder. I am using xampp 1.7.1. Can any body help me out? Is there another process to install curl in Xampp? or curl embeded with xampp ?

    • steverino says:

      I’m running 1.7.3. Find the php.ini file under \xamppphp.

      Uncomment as noted at about line 952 the “extension=php_curl.dll” entry by deleting the semicolon (;), restart apache server and you’re good to go.

      Cheers!

  4. jahidshahed says:

    Thanks a lot……..
    I tried more than 2days but not success to install it because it isn’t installed…
    then i find your valuable information thanks buddy…

  5. Kris says:

    Thanks, you saved me a bit of a headache there :-)

    Kris

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">