How to Enable Curl in Xampp

How to enable curl in xampp?

You have to modify the php.ini files in your xampp folder. Three files in three different places need to be changed.

Follow the following steps to enable curl library with XAMPP in Windows:

Step 1:

Browse and open the following 3 files

C:\Program Files\xampp\apache\bin\php.ini
C:\Program Files\xampp\php\php.ini
C:\Program Files\xampp\php\php4\php.ini

Step 2:

Uncomment the following line in your php.ini file by removing the semicolon (;).

;extension=php_curl.dll

After that it will look something like something below-

extension=php_curl.dll

Step 3:

Restart your Apache server.

Step 4:

Check your phpinfo() to see whether curl has properly enabled or not.

Enjoy using curl() library.

How to enable cURL in PHP / XAMPP

Since you're using XAMPP, uncomment the line

;extension=php_curl.dll

in xampp\apache\bin\php.ini, and then restart the Apache service.

NB: In newer XAMPP versions, PHP has moved to root xampp folder xampp\php\php.ini.

Enabling the cURL library for PHP using XAMPP for Windows

Make an

<?php phpinfo(); ?>

there you can see which php.ini is loaded. In this file you uncomment the the extension line.

When there is no php.ini in this path which is in the phpinfo this should be xampp/php/php.ini then rename one of the two files

C:\Program Files\xampp\php\php.ini-development

to

C:\Program Files\xampp\php\php.ini

XAMPP and cURL not working, after uncommenting php.ini

Check this out: http://www.kanersan.com/blog.php?blogId=45 I had a similar problem except for error reporting. Searched all over the internet and all I found was "modify the php.ini file". I modified all the php.ini files but I was still getting the same error. Turns out WAMP has visual settings which I believe overwrite the php.ini. So to turn on curl, you'd left click on XAMPP icon in your start start menu -> PHP -> PHP Settings -> php_curl (make sure it is checked).

Maybe this is your problem.

Hope it helps.

-c0d3



Related Topics



Leave a reply



Submit