XAMPP and cURL not working, after uncommenting php.ini
Solution 1
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
Solution 2
I had the exact same problem but could not find the solution online.
Every site I saw said to uncomment "extension=php_curl.dll" which didn't fix the problem.
I finally solved it by adding the path to curl.dll to the variable.
That is, I changed: extension=php_curl.dll to: extension="F:/WebServer/PHP/ext/php_curl.dll"
Hope this helps you or somebody else.
Related videos on Youtube
Jon Lawton
Stack Overflow is here to save people like myself from the traps of life.
Updated on June 22, 2022Comments
-
Jon Lawton almost 2 years
Someone else with the same problem still didn't get a decent answer/fix for my problem:
Before you comment or criticize, please make sure you read my proceedures below so as not to repeat what I've seen 100x already in Google and Stack Overflow...
- XAMPP (Lite) installed on Windows 7 in
C:\xampplite
(newest version, only onephp.ini
file inC:\xampplite\php
) - XAMPP and PHP scripts run correctly in
http://localhost/
- libcurl installed (by XAMPP default) in
C:\xampplite\php\ext\php_curl.dll
-
php.ini
edited and saved for removal of;
at beginning of lineextension=php_curl.dll
-
php.ini
default forextension_dir = "C:\xampplite\php\ext"
correct and left alone - Apache service restarted in Windows Services
- Computer restarted
- Apache service (manually) restarted again
-
phpinfo();
still does not display anything with the word "curl" in it - Still no success
Thanks in advance.
-
Jon Lawton about 12 yearsCreate an answer so I can at least give credit to you in the end ;)
-
C0D3 about 12 yearsOkay, I was manually editing the php.ini on WAMP without success as well. That's why I posted. But if, no GUI, then I don't know either. Maybe should switch to WAMP? ;)
- XAMPP (Lite) installed on Windows 7 in
-
Jon Lawton about 12 yearsThe only thing I can figure is if there's a problem with XAMPP marking my computer as Production rather than Development, which has different set defaults, but I haven't heard of any wide-spread problems like that.
-
C0D3 about 12 yearsNow I'm curious too! I wonder why it is not working! Post something if you find out? :)
-
Kiee about 10 yearsBit late but maybe someone else may require this, you may not have had
extension_dir = "ext"
uncommented so php knows where the extensions are stored. -
HartleySan over 7 yearsI had to add the following to my PHP code to get things to work:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
Maybe that's the issue. -
zeta about 4 yearsWhat does this help? "C:\xampp\apache\bin>curl.exe", outputs curl: try 'curl --help' or 'curl --manual' for more information