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
How to Zip Folder Without Full Path
Why Don't PHP Attributes Allow Functions
PHP Include Error Not Findind the Path
Why Use $_Server['Php_Self'] Instead of ""
How to Sort an Array of Utf-8 Strings
Include Constant in String Without Concatenating
Call Laravel Controller via Command Line
How to Add Text to an Image with PHP Gd Library
Can't Install PHP Package on Centos
MySQL - Count Total Number of Rows in PHP
Check If Download Is Completed
Difference Between Array_Map, Array_Walk and Array_Filter
PHP MySQL Update If Exist or Insert If Not
Dependency Hell - How Does One Pass Dependencies to Deeply Nested Objects
How to Use Open Id as Login System
How to Prevent PHP Sessions Being Shared Between Different Apache Vhosts