Fatal error: Call to undefined function curl_init() – WAMP Server – PHP

I encountered this error after installing a WordPress plugin. Error message was thrown in one of the php files in the plugin because of the line below:

$ci = curl_init();

Then, on this line I right-clicked on curl_init and clicked “Go to Declaration” which opened a curl.php file under netbeans7.4phpphpstubsphpruntime and method was empty (hence the name stub I guess):

function curl_init ($url = null) {}

I thought I needed to install php5-curl package but it was simpler than that. It was already installed on WAMP Server 2.4, all I needed to do was to enable it as below:

1- Click on WMAP icon
2- Go to PHP->PHP extensions
3- Click php_curl

And the error message was gone!

Hope this helps someone.

Good luck,
Serdar.

One thought on “Fatal error: Call to undefined function curl_init() – WAMP Server – PHP

  1. Your style is very unique compared to other folks I’ve read stuff from.

    Thanks for posting when you’ve got the opportunity, Guess I will just bookmark this page.

Leave a Reply

Your email address will not be published. Required fields are marked *