• Subscribe to Our Feed
  • Facebook
  • Twitter

Enable Curl on Xampp

I generally do my development work on a local windows machine with the latest version of Xampp 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\twitter\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: curl, feed, fix, programming, tutorial, Twitter, xampp

Related posts

Posted in Technology | View Comments

View Comments to “Enable Curl on Xampp”

  1. satya says:

    thanks budy

  2. satya says:

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

  3. snake says:

    thank u! thank u thank u thank u so much

  4. kapil says:

    Thanks alot sir…realy….

Leave a Reply

blog comments powered by Disqus

Grape Thinkers

Categories

Archives