How to Enable libcurl in WAMP
Are you are getting “Fatal error: Call to undefined function: curl_init()” and you’re using WAMP, you’ve got to perform a few extra steps to get cURL working.
Wamp comes with a lot of extensions, including cURL, it is just a matter of getting the extension loaded when wamp is started. And no, enabling php_curl from within the wamp menu is not how to do it.
For some reason, that just doesn’t work.
How to Enable libcurl in WAMP
Here are the steps for getting cURL enabled in WAMP.
Step 1
- Open C:wamp\bin\php\php5.2.6\php.ini
- Find “;extension=php_curl.dll” and remove the semicolon to uncomment the line
- Do the same for C:wamp\bin\apache\apache2.2.8\bin\php.ini
Note: the version of WAMP you’re running does not really matter. The step should be the same for all versions.
Step 2
Next, you need to make sure apache can find the extension to load, so make sure that in both php.ini files, you find the lines:
1 2 | ; Directory in which the loadable extensions (modules) reside. extension_dir = "C:\wamp\bin\php\php5.2.6\ext" |
Make them both point to the ext folder within your PHP folder. By default, they will be set to something like /usr/bin/ext. This is what you will need to change.
Step 3
Restart wamp and it should all work. You can look in the phpinfo() to see if cURL was loaded. If it still doesn’t work, check the apache error log within the wamp logs folder for additional clues.
Good luck!
Enjoy this Post?
Spread the word by promoting this post on FaceBook and Twitter.

Thanks! It really helps!
Thanks! … works a charm
Thanks! WAMP was using curl just fine, but I was having trouble getting the NetBeans IDE’s PHPUnit support working with curl. Uncommenting the appropriate line in php.ini did the trick.
Thanks! Works
YOU’RE MY HERO
Really works…… SO MANY thanks