I'm trying to use curl with PHP on my box without any success.
My Config :
OS : win 7 64 bits,
PHP : 5.3.1,
Apache : 2.2.14
I was able to use the mysql extension, so the configuration of my php.ini seems fine. But I get and error in Apache log with curl :
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php-5.3.1/ext/php_curl.dll' - The specified module could not be found. in Unknown on line 0
The file is right there, and it's loading php_mysql.dll without any problem.
I tried everything : to put the dll file in apache\bin, windows\system32, put the path of the php EXT in the PATH environment variable. to put some lib (libeay.dll and sssomething.dll) in windows 32
Well, I think this might have something to do with my Windows being 64 bits or with the version of PHP.. maybe. I don't know anymore :(
Any idea?
Update I'm not using Wamp because I like to know what I do to my system, and ultimately choose the version that I want of apache, php and MySql.
My Solution
I added the path of PHP in my PATH environement variable and it worked. I'll try to find out what was the DLL needed.
Update : Well it looks like it was libeay32.dll and sslleay32.dll had to be in the PATH environment variable. I added to the bin subdirectory of Apache and it worked.
AFAIR, you need libeay32.dll and libssl32.dll files on PATH for Curl to work properly. And probably 64 bit for your x64 system.
It's been a while since i've been on windows, but I think you have to also make sure that curl has a check mark next to it under "plugins". Also, just searched google and found this:
Curl can indeed be enabled under WAMP running on a Windows Environment.
The steps are as follows :
1) Close WAMP (if running) 2) Navigate to WAMP\bin\php(your version of php)\ 3) edit php.ini 4) Search for curl, uncomment extension=php_curl.dll 5) Navigate to WAMP\bin\Apache(your version of apache)\bin\ 6) edit php.ini 7) Search for curl, uncomment extension=php_curl.dll 8) Save both 9) Restart WAMP Source: http://www.dibugs.com/curl-enabling-wamp
It appears you have to enable it in apache, as well as the php.ini. Try just right clicking on the wamp icon next time, hovering to extensions, then clicking on the desired extensions.
This may be a longshot, but which php.ini did you edit? Because with WAMP, the one Apache uses is in the bin directory of Apache.
You could have used the Wampserver from http://www.wampserver.com/en/ From the menu it provides you can easily enable curl it takes care of the rest.
Since there are packages like XAMPP http://www.apachefriends.org/en/xampp-windows.html, and WAMP already available on the net you can use them to set up the WAMP stack instead of building it from the scratch. Thease packages offer easy menus for enabling and disabling php extensions.
Man, it's doing my head in. I've done the same right off the bat (experience with php...), added the path of PHP and PHP/ext, but no-go. It just would not init.
I've installed all 64-bit on a win7 x64 (so mysql/php/apache are all 64-bit versions) but I'm at a loss.
World of advice; install the 32-bit versions if you can help it. 64 bit is still the 'mystic future', sadly, regardless of x64 processors being around for years.
Please copy the libeay32.dll and sselay.dll in to the C:\windows and C:\windows\system32 and restart on your webserver and see the correct php.ini file is loaded
I tried all above steps and still having same problem. I did copied the libeay32.dll and sselay.dll in to C:\windows\system32 and restart but still does not work.
Yet, when I copied libeay32.dll and sselay.dll to C:\windows, it WORKS!!!!
What I did for this problem with PHP cURL in Windows 7 64-bit / Windows 8 64-bit:
php.ini
in C:\wamp\bin\php\(your PHP version)
and remove the semicolon from ;extension=php_curl.dll
.If it is still not working:
I downloaded php_curl-(your PHP version)-VC9-x64.zip
from this link, and replaced the default php_curl.dll
in C:\wamp\bin\php\php-virsion\ext
with the new one.
This solved my problem.
For others having the same problem, if the selected solution does not work, you should know that the php_curl.dll in a certain package of WAMP server was the wrong file, I had the same problem, I found the correct php_curl.dll file in /wamp/bin/php/php[youversion/ext/ and replaced it and it worked. See this article: http://forum.wampserver.com/read.php?2,85716
Goto WAMP's bin folder and open php folder. open php.ini and uncomment extension=php_curl.dll
Goto WAMP's bin folder and open Apache\bin. Open php.ini and umcomment extension=php_curl.dll
Restart WAMP Source:: Thats all!!! Problem fixed
I had same problem for my Apache24 on Windows 7 with PHP 5.6.5 This is what I did and fixed the problem. Move to Windows\system32 folder: libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll
Move to Apache24\bin folder libssh2.dll
Uncomment extension=php_curl.dll
To enable cURL using PHP7, insert the C:\php
to the PATH:
After that, go to C:\php
open the php.ini
file and uncomment the line extension extension=php_curl.dll
by deleting the semicolon at the beginning of the line:
Only had to copy libssh2.dll to the apache folder for cURL support to be enabled.
Using: