Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP and CURL under Windows 7 64 bits and Apache

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.\r\n 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.

like image 572
mrmuggles Avatar asked Jan 20 '10 05:01

mrmuggles


2 Answers

What I did for this problem with PHP cURL in Windows 7 64-bit / Windows 8 64-bit:

  1. Stop WampServer.
  2. Open php.ini in C:\wamp\bin\php\(your PHP version) and remove the semicolon from ;extension=php_curl.dll.
  3. Start WAMP and test.

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.

like image 149
Erfan Safarpoor Avatar answered Nov 15 '22 12:11

Erfan Safarpoor


AFAIR, you need libeay32.dll and libssl32.dll files on PATH for Curl to work properly. And probably 64 bit for your x64 system.

like image 37
Sergei Avatar answered Nov 15 '22 13:11

Sergei