Troubleshooting Diary

Wamp Server 2.2 Windows 7 64-bit and curl (Also for Windows 8)

Edit : Tried it with Windows 8 and it worked. So safe to say this info applies to Windows 8 also.

The day of realizing that you can’t “try” stuff on your live web-site for me was yesterday. Not that I didn’t know better but when you have very few users you don’t mind taking down the site and restore from a backup if something goes wrong. Lately this site of mine gets about 40-50 unique users per day so finally I decided to set up a local version of my joomla 2.5 website so I can try new features, arrangements and plugins without the risk of disappointing 50 souls on the world.

I downloaded WampServer 2.2 with PHP 5.3.13 from http://www.wampserver.com and set it up successfully. I took my site’s backup with Akeeba (it’s a nice tool for backing up both your files and database for joomla by the way) and used kickstart to restore it on my localhost.

Everything went well until I finished restoring the site and navigate to the front page… a blank page it was, even the “view source” turned blank. Furthermore a new installation of joomla worked flawlessly. So it was one of my installed plugins, but which one? No no no I didn’t try each don’t worry…

The page was working fine on live server but not on localhost. So I started digging… After spending some quality time with my old friend google I figured I needed to turn error reporting on :) There it was; one of my plugins needed php curl extension and was throwing some nasty  exception, causing mayhem.

A simple phpinfo check revealed that I didn’ t have curl enabled. No problem.. I went to the WampServer tray icon PHP -> PHP Extensions -> php_curl and was frustrated to see that it didn’t work…

It was supposed to fix the issue and for many people as far as I could tell from the posts all over the web it really did. Just not for me.

After a few more hours of googling and hair pulling, I stumbled upon a forum post reply (and an off topic one) saying something about a corrupt php_curl.dll !!

And that was it. The php_curl.dll file that came with WampServer 2.2 distribution was the issue for me. I downloaded php_curl-5.3.13-VC9-x64.zip from http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and extracted dll file in the extension folder. Finally solved the problem at 3 am in the morning. (There is something special about 3 am, that’s when I seem to hit the spot generally.)

I hope it helps some other poor soul out there wondering why s/he can’t get the curl extension to work…

Edit : Every time I setup wamp from start, I seem to forget the steps to enable curl. So here is a simple todo list as a self-note.

1. Setup wamp.
2. From wamp icon select PHP > PHP extensions > php_curl  (it needs to be checked)
3. Extract php_curl.dll from the zip and copy it to PHP extension directory (mine is c:\wamp\bin\php\php5.3.13\ext)
4. Restart all services from the wamp menu
5. Go to localhost and click phpinfo() link and see that curl is there…

48 Comments

  1. Wondeful yaar.. took 3 minutes to solve the issue. You experience is a guideline to others :)

  2. uche

    thanks help a lot. For those who its not working for. go to this site http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/. scroll down you will see “Fixed curl extensions:” download both depending on the version your using and try each of them to see which will work for you. I tried one and it did not work and i tried the other one and it worked for me. Good Luck and happy coding when you do sort it out :)

  3. Abhijeet

    Thanks Friend help me lot!!!

  4. Not working on Windows 8 x64. php 5.4.12

  5. from saudi arabia machcoooooor

    thanks

  6. Awsome, Thanks

  7. Rachel

    Hi, I am new to web dev but not new to programming. I am running Win 8 64bit and want to set up Wamp to imitate a test server. Am at the right site?

    My instructor recommended Wamp but has never used it since he has servers at home and work. Our school is on Win 7.

    Thanks

    • Umut Ozkan

      There are other options for a local test server but yes you can use this instructions to set up Wamp with working curl support.

  8. JAspreet

    Hi .. i am using windows 8.. did not help me..

    • Same problem here.

      • Wait got it to work. Make sure you are putting the ini in the right dir.

  9. Sarvar

    Bolshoe Spasibo!!! (Russian)
    Katta Rahmat!!! (Uzbek)
    Thank you!!!

  10. Thank you. Lots of love from Zimbabwe. Quite a life saver

  11. Aaryan Ahmed

    Great………

  12. Fernando

    Thank You, works for me !!!

  13. Eder

    Thx! im with Windows 8 and ur solution solve my problem (replace the DLL and restart Wamp)

  14. Wowman

    Wow, dude… Thank you so much, it works! :)

  15. PHPerson

    Thanks Umut!

  16. Thanks!

  17. Thank you for this post. My situation was the same than Bruno: the one which worked was: http://www.anindya.com/php-5-4-0-x64-64-bit-for-windows/ (Wamp 2.2, Windows 7, PHP 5.4.3).
    Thanks a lot.

  18. Thanks for the information and for pointing out the ressource.

    For me with Wamp 2.2 and wampmanager.exe version 1.6.1.33 on windows 7
    the php_curl.dll contained in php-5.4.0-Win32-VC9-x64.zip
    at http://www.anindya.com/php-5-4-0-x64-64-bit-for-windows/
    solved my problem, while
    the php_curl.dll contained in php-5.4.11-nts-Win32-VC9-x64.zip
    at http://www.anindya.com/php-5-4-11-and-5-3-21-x64-64-bit-for-windows/
    did not.

  19. Carlos Alberto

    Thanks for the help

  20. Thank you for this post! It worked for me! :)

  21. Thank you very much Umut, i was trying to install Magento in win64 using wamp 2.2 and i could resolve the curl extension problem by downloading it from the link you gave us.

    Cheers

  22. Malick

    Thank you SOOOO much man you’re so amazing :D I’ve been searching for ages for a solution and you saved my life! It’s 3am for me as well so I guess all great solutions happen now!

  23. Read and tried all of those files. (64bit win 7)

    Gave up, installed visualC++ for win 32, then installed wamp 32bit.. now curl works

  24. Wow, you are the man. Saved me lots of time.
    Windows 7 64bit
    Apache Version : 2.2.22
    PHP Version : 5.3.13

    Working CURL extension: http://www.mediafire.com/file/15x93wjxofqesxy/php_curl-5.4.3-nts-VC9-x64.zip

  25. hebert ramos

    Man.. I would like to thank for their help, also took me a while to get your answer lol. Sorry for me english! Thanks from Brazil

  26. Andy

    Thanks a lot, great post!! Worked for me as well!

  27. Umut Ozkan

    You mean you can’t get curl to work?
    You need to copy the ‘php_curl.dll’ file in extension folder (mine was C:\wamp\bin\php\php5.3.13\ext)
    Also you need to uncomment the line with extension=php_curl.dll in php.ini (by uncomment I mean remove the ‘;’ before it)
    If you give me more detail on your problem I’ll try to help.

  28. Mike

    I use WampServer 2.2 Joomla 2.5 I need jomsocial running and I need that Sh&%t thing. I have tried everything I could find on google and youtube.. nothing works.

  29. Mike

    I tried what you say but it want work.

  30. thanks!!

  31. Nigel

    Wow, totally saved my bacon :)

  32. Thanks. This saved me a lot of time.

  33. Keller

    Thz man… work for me ;)

  34. satbir singh

    when i install joomla2.5 and when i log in as admin it show

    Notice: Array to string conversion in C:\wamp\www\school\Joomla_2.5.6-Stable-Full_Package\components\com_content\models\articles.php on line 124

    this error how i can sovle that problem

  35. theresa

    same problem here changed the curl and have the extension in phpini uncommented and have it enabled in wamp server but php info still says it is not there…..

  36. Thanksss!!! =D

  37. Dave Matheis

    Thanks. I’ve been fighting with cURL all morning trying to get it to work with a new apache 2.4 64-bit install, and this correct version of the php_curl.dll extension did the trick.

  38. hari

    I tried as directed but no improvements same error regarding php curl.

  39. Umut Ozkan

    Hi Hari, I copy paste my reply to Joe. If you give details I’ll try to help.

    —- pasted reply is as follows —
    Can you provide some details about your setup (OS, wamp server version etc.) and what kind of error you get. İf you turned error reporting on what error do you see instead of blank screen now?

    Did you check your php info? You probably don’t see curl in there if you did.

    Did you change the right dll? On php info page you should be able to see the extension folder. Make sure you change the php_curl.dll in there.

    And finally just clicking WampServer tray icon PHP -> PHP Extensions -> php_curl may not work all the time. Try changing configuration file manually. To do that go to wamp/bin/php/php5.3.13 (or your version) and open php.ini in a text editor. Uncomment line saying extension=php_curl.dll (if it’s not already uncommented)

  40. Umut Ozkan

    Glad that it worked for you.

  41. Jeremy

    Thank you!!!

  42. admin

    Hi Joe,

    Can you provide some details about your setup (OS, wamp server version etc.) and what kind of error you get. İf you turned error reporting on what error do you see instead of blank screen now?

    Did you check your php info? You probably don’t see curl in there if you did.

    Did you change the right dll? On php info page you should be able to see the extension folder. Make sure you change the php_curl.dll in there.

    And finally just clicking WampServer tray icon PHP -> PHP Extensions -> php_curl may not work all the time. Try changing configuration file manually. To do that go to wamp/bin/php/php5.3.13 (or your version) and open php.ini in a text editor. Uncomment line saying extension=php_curl.dll (if it’s not already uncommented)

  43. Joe

    I wish I could say it worked for me, but I tried every release on that page, thread safe and not, and used the curl dll’s and each, and got no better result. :(

    • JAspreet

      same here.. joe me neither :(

    • JAspreet

      Hey Joe got the solution..

      Solution for error “PHP extension “curl” must be loaded.” In Wamp server version 2.2 for Windows 7 (64-bit Operating System) ONLY.

      (Files to be Modified)
      php.ini file location: C:\wamp\bin\apache\apache2.2.22\bin\
      php.ini file location: C:\wamp\\bin\php\php5.3.13
      phpForApache.ini file location: C:\wamp\bin\php\php5.3.13\

      Find extension=php_curl.dll using find command in notepad in all above mention ini file and Remove semicolon if there is and it should look like extension=php_curl.dll

      Before (;extension=php_curl.dll) after (extension=php_curl.dll)

      Now download the new php_curl.dll file attached in this threat and replace it with current file. (location : C:\wamp\bin\php\php5.3.13\ext\\php_curl.dll)

      You can also download new php_curl.dll file from http://tinyurl.com/axsl738

Leave a Reply