Enable Curl on Xampp

I generally do my development work on a local windows machine with the latest version of installed. I was recently toying around with the tayst twitter feed, and was having trouble using curl with xampp.

The problem?.. curl was not enabled by default in Xampp.  You receive the following error:

  • Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\tayst\\index.php on line 4

The solution?  These simple steps!

Step 1. Stop all Xampp services: Apache, Mysql, Filezilla, and Mercury.

Step 2. Open the following files in your editor of choice. (Replace C:\xampp with the location of your xampp install)

  • C:\xampp\apache\bin\php.ini
  • C:\xampp\php\php.ini
  • C:\xampp\php\php5.ini
  • C:\xampp\php\php4\php.ini
  • C:\xampp\php\php4\php4.ini

Step 3. Find the following code in each of the files, and remove the ; (semicolon) at the beginning of the line. You will most likely see it at line 546 or line 582.

  • old line – ;extension=php_curl.dll
  • new line – extension=php_curl.dll

Step 4. Start your apache services.

See what an easy fix to curl on xampp by simply removing a few semicolons.  Happy Coding!

Tags: , , , , , ,

Posted in Technology | 13 Comments »

  • http://www.webinspiron.com naveen

    thank u !

  • http://www.webinspiron.com naveen

    thank u !

  • http://carinsurancebulletin.com/ CI

    thank u !

  • http://carinsurancebulletin.com/ CI

    thank u !

  • satya

    thanks budy

  • satya

    thanks budy

  • http://www.lucknowtutorial.com satya

    if u want to home tutor for PHP then call me at 09369791198

  • http://www.lucknowtutorial.com satya

    if u want to home tutor for PHP then call me at 09369791198

  • snake

    thank u! thank u thank u thank u so much

  • snake

    thank u! thank u thank u thank u so much

  • kapil

    Thanks alot sir…realy….

  • kapil

    Thanks alot sir…realy….

  • Wikidcool

    Great help… thanks!!!

Categories

Archives