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.

  1. Restarting Apache is required on both Windows and Linux whenever you make configuration changes. [back]

21 Responses to “Using CURL in XAMPP”


  1. 1 Dave Bowker

    Many many thanks for this post. I’m currently redesigning my site and needed to use Curl locally. Great post!

  2. 2 Frank

    Nice post mate! Worked a treat for me, just when I was about to start downloading .dlls and uncommenting configuration directives all over the show :) Thanks!

  3. 3 Folkert

    Thanks a lot for popping up high in google with this post, saves me and i thinks lot’s of others. Url is to a post with sort of the same info.

    Thanks.

  4. 4 Sam Potts

    That works perfect! Even on “lite”. I’d read about having to configure 6 files elsewhere but remove the semi colon and you’re away.

    Cheers
    Sam

  5. 5 MyGreyGoose

    Thank You! That simplified what I couldn’t find anywhere else without pages of complicated instructions. Save me tons of time!

  6. 6 Russ Timo

    I have spent 2 days googling around untill I found this site. Man, this is perfect fit! many thanks.

  7. 7 Edgar Santos

    Thanks… I google this but there is a lot of wrong information about this topic.

  8. 8 Barlow Tucker

    Thanks for the help! Worked great! Sounds like I am lucky to have found this page first :)

  9. 9 norm

    ** SIMPLY RESTARTING APACHE MAY NOT BE ALL THATS NEEDED **

    I had to reboot Windows to get mine to take. - Beat my head against the wall for 2-3 hours on that before tossing in the towel and giving the machine the three-finger salute.

  10. 10 Aveesh Kumar

    Thanks a lot for the simple solution. Am sooo very glad you came high on the google pagerank when i searched “PHP curl XAMPP”…cheers

    Cheers…

  11. 11 Binu Jayaraj

    Million thanks.

  12. 12 Xaratos

    Thank you a lot (from Italy)

  13. 13 Dave

    Saved me a lot of bother! Many thanks.

  14. 14 Internia

    Simply and clear, thanx a lot, great post

  15. 15 Mouly

    Thanks for the solution

  16. 16 Mike

    This is pure awesome. Many thanks for helping me fix curl with my xampp install. I was getting a fatal error with curl_init()

  17. 17 Ivan

    Thanks very much…it was actually very simple :)

  18. 18 ajai

    Thanks alot. Worked like a charm

  19. 19 judotens

    it doensn’t work on my xammp =((

    please help me brothers..

    Fatal error: Call to undefined function curl_init() in D:\xampp\htdocs\test\tes.php on line 9

  20. 20 Bruce

    Thanks from me too!! Just got back into working on my site and I don’t really care about learning about all the inside programming and services so your simple fix got me past this hurdle and frustration. :-)

  21. 21 Chakri

    Thank you for clearing that up. That helped me!!!

Leave a Reply