Enabling CURL on Windows+PHP+Apache Machine!

PHP Logo This is for all php programmers using Windows.

If you are planning to use CURL library on PHP then you may encounter an error like below.

Fatal error: Call to undefined function curl_init() in F:projorkutfeedstrunkindex.php on line 15

I encountered above while developing orkutfeeds.

Curl is by default not enabled on PHP on Windows although it is there. So to enable this go through following steps…

  1. Locate php.ini **file. Its under directory where you installed PHP. On my machine its path is: **C:wampbinphpphp5.2.5php.ini
  2. Once you find that file search for extension=php_curl.dll line
  3. There you will find a semicolon **(;**) before above line. Just remove it and save the change. That’s it!

If you have started webserver already then, you need to restart it again so that CURL extension gets loaded.

I found this while reading notes on PHPs’ official CURL page. This was posted by Lancelot du Lac.

In case your search for extension=php_curl.dll fails you may go through the steps mentioned by Tony Spencer.

About Author

Rahul Bansal

Rahul Bansal

I am a geek (wordpress), blogger (tech) & entrepreneur (rtCamp)