PHP Unconference Europe 2015


To use PHP's cURL support you must also compile PHP --with-curl[=DIR] where DIR is the location of the directory containing the lib and include directories. In the include directory there should be a folder named curl which should contain the easy.h and curl.h files. There should be a file named libcurl.a located in the lib directory. Beginning with PHP 4.3.0 you can configure PHP to use cURL for URL streams --with-curlwrappers . This feature was moved to PECL as of PHP 5.5.0.

Note: Note to Win32 Users
In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH. You don't need libcurl.dll from the cURL site.

add a note add a note

User Contributed Notes 18 notes

10 months ago
If you are running on Windows with a Wampserver or alike preconfigured PHP, if you did everything that was advised (path is correct, dlls are in the System32 or the Wow64 folder, php_curl extension uncommented in the php.ini, rebooted your machine and restarted your services), and you still receive messages saying that curl is not installed :
- maybe you are running a command line script (and not a curl instruction within a web application). If yes, remember that there are 2 distinct php.ini configuration files : one for the php-cli commands (run php at command line) and one for the php instructions (run from a page in your www folder).
Wampserver's menuitem "php.ini" only opens the webserver's php.ini, not the php-cli one.
So it will be great to check your php-cli's php.ini configuration file ! (you'll find it in the php.exe's installation folder)
You need to uncomment the extension php_curl in this php.ini file for the command lines to work with curl.
Also uncomment the php_openssl extention by the way (often used with curl).
I hope this fixed issue will help someone else :)
Joseph Marlin
3 years ago
Ubuntu 11.04

I already had Apache and PHP5 setup, but simply adding php5-curl and curl did *not* work. I also had to get libcurl3 and libcurl3-dev. The full command:

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

You'll know if it works because phpinfo() will get a new section with Curl info.
jorijnsmit at gmail dot com
7 months ago
It is not necessary to always (re)compile PHP. For me it was sufficient to install php5-curl and restart Apache:

$ sudo apt-get install php5-curl
$ sudo /etc/init.d/apache2 restart
wixelbomb at yahoo dot com
4 years ago
Just an additional note for Windows XP installations ...

The instructions others have courteously given still lack one small item for those who have the Windows/system32 directory as the repository for the .dll files concerned with php_curl.

Go to the ext directory of your php installation and copy php_curl.dll  to the Windows/system32 folder after you have followed the advise given elsewhere.

So ...
1) remove ';' from extension=php_curl.dll in php.ini
2) ensure that  ssleay32.dll and libeay32.dll are in Windows/system32.
3) Copy php_curl.dll into Windows\System32 as well.


comments at adstation-systems dot com
6 years ago
You may be confused, as I was, by the instructions for installing cURL in php.  The instruction "To use PHP's cURL support you must also compile PHP --with-curl[=DIR]..." was murky to me, since I didn't compile php when I installed it.  I just copied all of the necessary files to the correct folders as described very clearly in the php manual.

I am using Windows XP and Apache with php 5.1.6. In this situation, and it may apply to php versions of 5.0 and later, all one needs to do is remove the ";" from the front of the directive extension=php_curl.dll.  You should also check to make certain that libeay32.dll and ssleay32.dll are in your php directory with the other dll's.  This directory should already be in you path, so the instruction to put them in you path is not critical.

You can then run phpinfo() and you should see a heading for curl in the listing.

Succinctly, my installation of cURL consisted of removing the semi-colon in front of the ;extension=php_curl.dll line in php.ini, saving php.ini and restarting Apache.  You may wish to try this if you are using php 5.0 and later and are having difficulty understanding the instructions on the cURL installation page at

You might also find the information at useful.
jmichieli76 at yahoo dot ca
2 years ago
It should be noted that on a standard installation of php 5.2.17 on windows has this functionality installed and enabled by default.
regs at voidship dot net
6 years ago
If you're dense like I am, spare yourself the trouble on an Ubuntu system (probably Debian too) and...

$ sudo apt-get install php5-curl

Then feel dumb, but not as dumb as me.
Samuel Marshall
1 day ago
Win32 Users: As of PHP 5.5 you also have to libssh2.dll on your path along with libeay32.dll and ssleay32.dll for cURL to work.
ken at kenw dot us
12 days ago
I had to also also copy libssh2.dll into my Apache24 folder for this to work with my PHP 5.6.2 installation. So altogether I had to do the following:

Move to Windows\system32 folder:
libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll

Move to Apache24\bin folder

Uncomment extension=php_curl.dll
jwagner at digilog dot de
16 days ago
On Windows hosts libeay32.dll and ssleay32.dll have to be path-accessible for php_curl.dll to work correctly. Copying them into System32 (or even into the Windows main directory) is a bad hack (and does not even work with newer PHP versions). The right way to do it, is to add the PHP path to the Windows *Path* variable. In *Control Panel* --> *System* click on *Advanced System Settings* and use the button *Environment Variables*. Under *System Variables* you will find the *Path* variable. Edit it and append `;C:/PHP` to it - or whatever the path to your PHP root folder is.
musicdev at gmail dot com
1 year ago
A tip for users that now use the latest version of Windows 7 Ultimate, Apache 2.2.22 and PHP 5.4.4.  If you manually installed PHP and did not change the PHP folder name such as "C:\php-5.4.4-Win32-VC9-x86" you don't need to add the curl libs into the System32 directory.  Instead, modify the php.ini cURL extension to point directly to the php_curl.dll as follows:


I added the libs to system32 and moded the path as well just in case.  Worked well for me.
cristianods at yahoo dot com
6 years ago
Tip for Installing cURL with AppServ development server on Windows

If you are running AppServ as a WAMP development environment on a Windows machine, you may experience difficulty installing cURL. Here are some helpful steps:

First go to the PHP directory and copy the following libraries to the windows/system32 dir.

Open the php ini file and remove the ; from extension=php_curl.dll

Reboot your machine to load […]
3 years ago
For Windows 64, put the DLLs into the Windows/SysWOW64 Folder.
3 years ago
It's not sufficient to put libeay32.dll and ssleay32.dll into your path.  They also need to be in the PHP directory or it will not function, apparently.
y dot gonzalez at bifie dot at
3 years ago
For users of win7 64:
I just copied the library php_curl.dll to System32 and it works like charm ;-)
rohanshenoy at w3hobbyist dot com
6 years ago
If you are using WAMPserver, you can enable the cURL extensions by
Left-click on WAMPserver tray icon>PHP>PHP extensions> Check php_curl.

Its already loaded on your disk, you have to activate it.
Christopher McCulloh
6 years ago
If you are using XAMPP ( all you have to do is uncomment this line (line 582):


in the xampp\apache\bin\php.ini file.
aaron at iodragon dot com
8 months ago
make sure there is a curl-config under DIR or DIR/bin
otherwise there will be an error when running ./configure
To Top