Getting cURL to Work in XAMPP

Simple yet effective.

  1. Go to xampp install directory.
  2. Go to php.ini in php directory.
  3. Open php.ini and find curl, uncomment the first find you see. Save and close file.
  4. Go to php.ini in apache directory.
  5. Repeat Step Three.

Done.

reader comments (49)

  1. johan says:

    Do you have to install curl or does it come with XAMPP?

    I did phpinfo() and curl doesn’t show up, even though I uncommented it as you directed.

    Thanks if you can help.

  2. Gabriel says:

    hi jonah, curl is a module in php, identified by libcurl. In XAMPP, this comes pre-packaged, but not pre-installed. You may want to try restarting your XAMPP server, via xampp-control.exe which should be in your xampp root directory.

  3. Awesome! Thanks.

  4. Ewan says:

    Brilliant. Thanks for this.

  5. MAGARA says:

    Just Briliant. I have been pacing around trying to figure out how to get this working until i came across your awsome post. Many thanks.

  6. Gabriel says:

    @Magara, @Ewan, @Dao – Glad I could help!

  7. Jodi says:

    Thanks for this post! Now I don’t have to dig through pages of text or forums! Yay!

  8. norm says:

    MAY NEED TO RESTART WINDOWS – ONLY RESTARTING APACHE MAY NOT BE ALL THATS NEEDED

  9. Using cURL with XAMPP…

    If you have read through this blog, you will realise that I am a big fan of the cURL library for PHP. Also, when using windows to code – I like to use the XAMPP package to give me easy access to an Apache, PHP and MySQL stack.
    So here is my quick guide…

  10. Ahmad says:

    Thnx very much , this post help me alot THANKS !b

  11. Murali Krishna K says:

    Thanks for this simple steps … helped a lot.

  12. Progress says:

    I also did what u say.. … uncommented but still it says “You must have CURL installed with SSL Support for WHMCS to function correctly” ….

    any help with this problem?

  13. Gabriel says:

    Hi Progress – Gosh, Im not sure what WHMCS is, but it sounds like you need to have SSL support running as well, which is also an Apache mod like cURL. Do you have OpenSSL running? You may need to get both running, then shut down XAMPP and restart it. Let me know if any of this helps.

  14. Jose Merlin AR says:

    Please follow the steps for curl:

    1. Locate XAMPP install directory
    2. open php/php.ini
    3. do a search for the word ‘curl’ and uncomment (remove the leading semicolon) that line
    4. save & close
    5. open apache/bin/php.ini
    6. search for curl, uncomment as before
    7. save & close
    8. restart apache

  15. sXe says:

    Thanks man! ;)

  16. Rocklion says:

    Thanks man, it worked.
    P.S.: The cURL library is included in xampp, you need only to uncomment the requested lines in the configuration files. Happy coding ;)

  17. Excellent Post, I got it kicking in less than 2 min

    Thanks !

  18. Chris says:

    Thanks so much. Saved me a lot of time.

  19. Roberto says:

    Muchas gracias!

  20. Vishnu says:

    How to install curl in xampp on linux

  21. Anwar says:

    Thanks man ! I enjoyed it a lot .

  22. C says:

    Thanks a ton!

  23. Mirza Fariad says:

    Dear Sir, Thanks verymuch for this post. It make my work faster as to being download curl and deploying and install was a big work.

    But i have problem i did’nt find any php.ini file in apache.. But i made a change in php folder.

  24. Seong says:

    - in php\php.ini, extension=php_curl.dll was already uncommented.
    - I don’t see php.ini in Apache directory
    - I don’t see also *libcurl* named files.
    - I’m getting “Warning: include_once(simple_html_dom.php) [function.include-once]: failed to open stream: No such file or directory in ” message in my browser.

  25. Astorino says:

    Thanks so much. Saved me a lot of time….

  26. uza' says:

    Thanks “Jose Merlin”

  27. Perfect, thank you.

    I expect restarting Apache would be required more often then not. It was for me, so might be worth adding it to the list just to avoid confusion.

  28. windows XP SP 3 – with the 2009 August XAMP the ini is only in the php folder (makes sense) after uncommenting i registgered the dlls in the windows folder (after copying them from the xamp\php folder) ….

    also added the php folder with all the dlls and the apache/bin to my System Path var

    but no curl!

    now restarting PC!

  29. joel says:

    Thanks man, it works..

  30. joel says:

    Thanks and I didnt find php.ini file inside apache/bin. I got curl without changing anything inside apache dir……….Thanks again

  31. robert says:

    Awesome!!!

  32. Jamal says:

    That was brilliant, it works :-)

  33. santosh says:

    thanx alot. small tips but of great value. I was able to successfully install moodle due to your valuable suggestion

  34. Dan Hall says:

    Thanks, very simple and it worked.. Now able to to run cURL from my home box… saves a lot of time of time.

  35. Thanks! It works! :D

  36. Parry says:

    Thanks a ton! Lot of results on the web, but nothing worked. It seems like they are not aware of multiple php.ini present. Yours worked for me perfectly!

  37. Raja says:

    Wonderful !!!! You Have Done Your Job Beautifully !!!! Keep It Up…..

  38. Linda Jobs says:

    many thanks dude for very simple but useful tip! You saved my time a lot.

  39. Upload says:

    wow.. its realy works.. thankss dud :D

  40. Prasanna says:

    Thanks a lot….

  41. I think this is one of the most vital information for me. And i’m glad reading your article. But want to remark on some general things, The website style is wonderful, the articles is really great : D. Good job, cheers

  42. Mahesh says:

    Thanks a lot man.

  43. Shankar says:

    Thanks a lot man
    it is just so simple ans amazing.

  44. A political leader must keep looking over his shoulder all the time to see if the boys are still there. If they aren’t still there, he’s no longer a political leader.

  45. Rob says:

    hey I read this and other info on the web about curl. i followed the instructions and restarted xampp but I still got this problem. where am I going wrong?

  46. harish says:

    Awesome.. It worked for me. Thanks for sharing the tip..

  47. Keith says:

    Wow. I hate to admit it but this solution took forever for me to find. Thank you so much, keep on keeping on!

  48. Doublet says:

    1. There was no php.ini in apache folder
    2. Make sure to restart Apache

    Works like a charm!

  49. Do we have to re-start the server? Because this did not work for me, I could not actually for a php.ini in the apache directory.

add your comment