Enable curl with XAMPP on Windows XP or 7

cURL stands for Client for URLs. It allows us to transfer files having URL syntax. It supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE.

To enable curl library with XAMPP we need to modify the php.ini files in our xampp folder.

Note that new versions of XAMPP might already have remove some of the config files leaving only one at xampp/php folder.

1) Locate the following files:
C:\Program Files\xampp\apache\bin\php.ini
C:\Program Files\xampp\php\php.ini
C:\Program Files\xampp\php\php4\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.
4) Check your phpinfo if curl was properly enabled. Just create a php file with the following contents below and save it as phpinfo.php
<?php phpinfo(); ?>

Comments

41 Comments on "Enable curl with XAMPP on Windows XP or 7"

  1. GodsDead says:

    Hey, thanks for this =]

  2. Amit Verma says:

    Excellent! Just Sweet & Simple :)

  3. 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…

  4. Vlad says:

    Thank you. This was a lot of help.

  5. Hi there,
    Many thanks for posting this information here.
    It’s been a very nasty couple of days for me with curl not working.. You’re a star for having pointed out the php.ini in the apache bin folder.. I had totally forgotten it..
    Many thanks,
    Bala Menon

  6. deepak says:

    this is was really of great help. thanks man.

  7. adam says:

    This worked!
    Thank you so much for this post.

  8. Cheap says:

    Thanks a lot, curl is working now!!

  9. mehmet says:

    matbaa ve matbaacılık deyince biz varız

  10. ashutoosh agarwal says:

    thanks a lot. its really good.

  11. XamppUser says:

    VERY useful article.
    Worked like a charm.
    You deserver to be #1 on Google results for this one! :-)

  12. lee says:

    Many Thanks !! this is awesome article.

  13. nara says:

    Maan.. you save my life :)
    Big thanks

  14. brillie says:

    Thank you…
    I need this to configure magento :)

  15. Me too, I always forget xampp’s REAL php.ini location!

  16. Dizi izle says:

    I don’t understand why did xampp disabled this. Curl is used very often.

  17. 8207h32 says:

    Thanks for share the tips. Its very usefull.

  18. s12307 says:

    Thank you so much!!!:))

  19. kili says:

    Un grand merci

  20. Hey..
    This is fantastic guide for enable the CURL in xampp..
    working fine in my pc..
    Thanks a lot..Brother for good article..

  21. vivek sharma says:

    Thanks Bro!! You Saved Me.

  22. Alok says:

    Hey thanks! it worked.

  23. Ees says:

    I found php.ini only at one location
    C:\Program Files\xampp\php\php.ini
    not the other two.
    What am I missing?
    And where will I check phpinfo to see curl is properly enabled
    Need help as I am new

  24. Vinicius says:

    thanks a million! :)

  25. To check the PHP info, create a PHP file and put just this in it:
    Run it, press Ctrl-F, and search for cURL. If it doesn’t come up, it didn’t work. If it does show up, you installed cURL successfully.
    Or just try running a script with curl_init() in it. If it says the function doesn’t exist, it wasn’t installed successfully.

  26. Raj says:

    I am using xampp.
    I removed the comment from all the files.
    Even I restarted the machine.
    No response.
    Actually when i call the CURL function, no further execution.
    Can someone give me idea???

  27. Amit Gupta says:

    Working! Thanks :)

  28. Mega says:

    it is really working. Thank you for sharing.

  29. bro says:

    Really nice. Thank you for sharing.

  30. della says:

    Helpful article. Thanks. it is working.

  31. buzzknow says:

    Do you have any idea how to enable cUrl in litespeed? i’m using centos5.5 x64bit.
    thanks and regards :)

  32. Swapnendu Das says:

    I find php.ini file only in PHP folder.I can’t find another two-Php.ini file.I am using xampp 1.7.1 Can any body help me out? IS there anoyher way to install curl? Thanks in advance

  33. Dave says:

    If it doesn’t come up, it didn’t work. If it does show up, you installed cURL successfully.

  34. Judy says:

    Just uncommend ;extension=php_curl.dll in the file C:\Program Files\xampp\php\php.ini,there are no other files in the new version of XAMPP. It will work well.

  35. alecu says:

    sweet, that’s the spot :)
    thanks dude

  36. Chelios says:

    THANK YOU !!!
    this is exactly what I’ve needed.

  37. Woothy says:

    For XAMPP 1.7.3 you only need to change php.ini on xampp/php folder :)
    regards
    Housewife

  38. Nelson dela cruz says:

    THANKS DUUUUUUUUUUUUUUUUUUUUUUDE! LIKE SAVER :)


Here's your chance to leave a comment!