170

I got my WAMP installed on my windows 7 64bit. cURL is not working, but still I got it enabled from the WAMP tray.

I have also uncommented extension=php_curl.dll in php.ini for both the PHP and Apache folder.

Windows give me an error message,

PHP Startup: unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll' - the application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-lin sxstrace.exe tool for more detail."

How can I fix this problem?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
will.i.am
  • 2,002
  • 3
  • 20
  • 22
  • 6
    I use XAMPP personally, I find WAMP to be too buggy in many areas. You may want to give that a shot if nothing else is working. – Tim Withers Jun 07 '12 at 20:25
  • 4
    I love wamp, i never have an issue with it – Drewdin Jun 07 '12 at 20:34
  • 2
    I'd say your best bet is to revert to Apache v2.2.9 and PHP v5.3.1. – Joshua Pinter Aug 28 '12 at 19:29
  • This seems to still be an issue in WAMP running PHP 5.4.13 and apache 2.4.4. Curl was working fine and then stopped and my script dies. Now just a simple curl init causes issue (the only thing in the file). Any updated patch sources? – Shawn Jan 13 '14 at 16:54
  • http://stackoverflow.com/questions/41107356/apache-2-4-23-php7-x-windows-10-x64-php-curl-not-working – Wasim A. Dec 12 '16 at 18:47

14 Answers14

310

Go to http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and download the cURL version that corresponds to your PHP version under "Fixed curl extensions:".

So if you have PHP 5.3.13, download "php_curl-5.3.13-VC9-x64.zip". Try the "VC" version first. Then replace the php_curl.dll in ext folder. This worked for me.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
sublucent
  • 3,236
  • 1
  • 16
  • 8
  • 3
    Thanks a bunch. I was going nuts over it. The deal is, it works, but not for curl_multi !!! Anyway, it pointed my in the right direction. I just went to wamp's website and downloaded the Apache add-on ver. 2.2.9 and PHP add-on ver. 5.3.1. With those in use, it works. Morale: not all that's latest version is best. – pHelics Jun 23 '12 at 03:18
  • 6
    Make sure to kill the httpd, wampmanager and all processes - and then start the wamp application again. Otherwise it sometimes doesn't really reload.. – guy mograbi Aug 13 '12 at 14:53
  • 1
    Make sure you download the VC version of curl that corresponds to your PHP version, otherwise it won't work. – Narretz Sep 12 '12 at 10:22
  • 2
    Don't work for me either, i tried everthing, can someone can connect to my PC and check it out? or advice me how to solve it, i did everything – Liad Livnat Feb 28 '13 at 19:14
  • Works in my case with php 5.3.13. Thank you. – Janis Veinbergs Apr 17 '13 at 11:36
  • for newbies like me: replacing the file is not enough, you also need to re-enable curl extension: click wamp tray icon / php / php extensions / php_curl – spioter Jun 24 '13 at 12:55
  • I'm using Windows8 x64 and re-starting WAMP wasn't enough, I had to restart my computer to make changes work for me. – Magda Sep 05 '13 at 22:18
  • The file that worked for me was `php_curl-5.3.13-VC9-x64.zip`. – kmgdev Dec 11 '13 at 03:37
  • anything for 32 bit version ? –  May 30 '14 at 05:58
  • What about PHP 5.5 and VC11? Does anyone have a working php_curl.dll for that setup? – rustyx Nov 12 '14 at 08:21
  • This solution is not a fix for PHP 7 because there are no "fixed curl extensions". In this situation I copied the libssh2.dll, ssleay32.dll, and libeay32.dll files into the apache24/bin/ directory (It already had one of these and I didn't overwrite it). I tried everything else and this was the only thing that worked. – Drew Dec 17 '15 at 21:45
  • http://stackoverflow.com/questions/41107356/apache-2-4-23-php7-x-windows-10-x64-php-curl-not-working – Wasim A. Dec 12 '16 at 18:44
25

I had the same exact issue. After trying almost everything and digging on Stack Overflow, I finally found the reason. Try downloading "fixed curl extension" separately from PHP 5.4.3 and PHP 5.3.13 x64 (64 bit) for Windows.

I've downloaded "php_curl-5.4.3-VC9-x64", and it worked for me. I hope it helps.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Farzan Balkani
  • 439
  • 4
  • 10
  • 1
    this is a good solution, replace a dll file and no need to downgrade. – Ekim Feb 21 '13 at 23:01
  • 1
    In addition to doing this I also found that I needed to upgrade to the latest version of WAMP and add the php bin folder to my %PATH% variable. – Lea Hayes Apr 03 '13 at 00:05
13

Works for me:

  • Go to this link
  • Download *php_curl-5.4.3-VC9-x64.zip* under "Fixed curl extensions:"
  • Replace the php_curl.dll file in the ext folder.

This worked for me.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
mpgn
  • 7,121
  • 9
  • 67
  • 100
5

I have struggled a lot with this myself.. In the end, PHP version 5.3.1 with Apache 2.2.9 worked...

I was getting the consistent error of missing php5.dll. For this, I renamed all the old php.ini files which are not required (outside of the WAMP folder) to old_ohp.ini.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
mjs
  • 657
  • 7
  • 14
  • 1
    I tried everything, from the answer above to re-installing WAMP. Finally I gave this a shot, and it's running nicely now with PHP 5.3.1 and Apach 2.2.9. Thanks! – StapleGun Aug 15 '12 at 03:31
4

The error is unrelated to PHP. It means you are somehow relying on Apache's mod_deflate, but that Apache module is not loaded. Try enabling mod_deflate in httpd.conf or commenting out the offending line (search for DEFLATE in httpd.conf).

As for the PHP curl extension, you must make sure it's activated in php.ini. Make sure extension_diris set to the directory php_curl.dll is in:

extension_dir = "C:/whatever" and then add

extension=php_curl.dll

  • This worked for me PHP7 Win 10 64 bit. Added the following to php.ini: extension_dir = "C:\php\ext" extension=php_curl.dll >>Also add C:\php to PATH in User and System variables – Emmanuel N K Sep 23 '16 at 04:22
2

The steps are as follows:

  1. Close WAMP (if running)
  2. Navigate to WAMP\bin\php\<your version of PHP>
  3. Edit file php.ini
  4. Search for curl, uncomment extension=php_curl.dll
  5. Navigate to WAMP\bin\Apache\<your version of Apache>\bin\
  6. Edit file php.ini
  7. Search for curl, uncomment extension=php_curl.dll
  8. Save both
  9. Restart WAMP
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
johnpaul
  • 29
  • 1
1

I think cURL doesn't work with WAMP 2.2e. I tried all your solutions, but it still did not work. I got the previous version, (2.2d) and it works.

So just download the previous version :D

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
flairon
  • 103
  • 1
  • 6
0

Well, just uninstall WAMP 64-bit and go with the 32-bit version. It worked in my case.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

This is how I've managed to load CURL correctly. In my case php was installed from zip package, so I had to add php directory to PATH environment variable.

Lixas
  • 6,938
  • 2
  • 25
  • 42
0

Ensure that your system PATH environment variable contains the directory in which PHP is installed. Stop the Apache server and restart it once more. With luck CURL will start working.

Terry Lin
  • 2,529
  • 22
  • 21
0

This work for me: http://www.mediafire.com/?3ay381k3cq59cm2 download a paste the file in ext folder PHP 5.4.3

kemado77
  • 29
  • 2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes – slfan Nov 05 '16 at 18:29
0

I had the problem with not working curl on win8 wamp3 php5.6. Reinstalling wamp (x64 version as I had x64 in system info) made it work fine.

Fanky
  • 1,673
  • 1
  • 18
  • 20
0

uncomment "curl=cainfo" in the php.ini document This helped me when installing Prestashop when all other methods still did not work.

adiga
  • 34,372
  • 9
  • 61
  • 83
-2

This is what worked for me

Answered by Soren from another SO thread - CURL for WAMP

"There seems to be a bug somewhere. If you are experiencing this on Win 7 64 bit then try installing apache addon version 2.2.9 and php addon version 5.3.1 and switching to those in WAMP and then activating the CURL extension. That worked for me."

Community
  • 1
  • 1
Abhishek Rakshit
  • 691
  • 7
  • 12