Spread the word

Tuesday, February 3, 2009

How to enable cURL support for PHP in Apache on Windows

So you want to enable cURL in your Apache Server? It is really easy and simple. But first you should check whether you have cURL already enabled on your server. Here is a very simple way to check:

Create a phpsetup.php file and put this code within it:

<? phpinfo(); ?>

Now view that phpsetup.php page from your browser and you will get all the details of your PHP setup on your server. Search for the “cURl support”. If you can’t find it then cURL support is not enabled on your system. But if you can find it and it shows “enabled” then you already have cURL enabled on your system.

So now if cURL is not enabled on your system then you can easily enable cURL by the following method:

Locate the following files:

Search for ;extension=php_curl.dll

Remove the semicolon at the starting of the line. Removing the semicolon makes the line uncommented and enables it.

Generally in most cases, just editing the first php.ini file which is in bin\apache\apache2.x.x\bin\php.ini, enables cURL on your server. But if editing the first file doesn’t enable cURL then you will need to edit the other files too.

Now just restart your Apache server and your cURL has been enabled on your server.

Check your phpsetup.php page again and search for the “cURL support” to verify if curl has been properly enabled.


Mark Burton said...

Wow, that was soooo easy!!!
Thanks a lot for sharing.

Augustine said...

Excellent guide. thanks a million


ذؤيب said...

Wow! so nice it works :)
tryed it with XAMPP
Thank you man !

Harrysuke said...

thanks :D

Muthuraj said...

Nice one, its very much usefull for me, Thanks:)

Anonymous said...

Hey! thanks .I enabled only in php.ini and not in apache's php.ini file....This was also not mentioned in php.net or in CURL site....Again saying very thanks !

website design hampshire said...

Thanks for giving this information man. I am about to build my new business website a few days later and I will use your data. Nice talk.

Anonymous said...

I don't have cURL in my php, what i have to do

Anonymous said...

Bullshit. Didn't work :/

Acmeous said...

Hey Anonymous buddy, Please let me know what you did and the problems you are facing. It works for thousands of users so I am sure it will work for you too. Make sure you are editing the proper file in proper location.

suri said...

I am php_Curl in php.ini. But it still not working.Can any one proveide alternative way to enable php_curl. while I try execure function_exists(curl_init) is not working due to curl is not enabled.

pcb manufacture said...

I wanted to thank you for this great blog! I really enjoying every little bit of it and I have you bookmarked to check out new stuff you post.

Jordania said...

that helped me.. thank you so much keep sharing

Zara Porter said...

Nobody likes to wait in this busy world. People want websites that load fast and don’t have them waiting to load. But, what if you have a lot of elements on your website that are taking too much time to load, but you don’t want to get rid of them? Well, there is a way out! You can use the lazy load effect wherein images outside of viewport are not loaded until users scroll to them.
Responsive Website Design Company in Bangalore | Social Media Marketing Agency in Bangalore

Post a Comment