XAMPP and cURL not working, after uncommenting php.ini

18,265

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.

Share:
18,265

Related videos on Youtube

Jon Lawton
Author by

Jon Lawton

Stack Overflow is here to save people like myself from the traps of life.

Updated on June 22, 2022

Comments

  • Jon Lawton
    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...

    1. XAMPP (Lite) installed on Windows 7 in C:\xampplite (newest version, only one php.ini file in C:\xampplite\php)
    2. XAMPP and PHP scripts run correctly in http://localhost/
    3. libcurl installed (by XAMPP default) in C:\xampplite\php\ext\php_curl.dll
    4. php.ini edited and saved for removal of ; at beginning of line extension=php_curl.dll
    5. php.ini default for extension_dir = "C:\xampplite\php\ext" correct and left alone
    6. Apache service restarted in Windows Services
    7. Computer restarted
    8. Apache service (manually) restarted again
    9. phpinfo(); still does not display anything with the word "curl" in it
    10. Still no success

    Thanks in advance.

    • Jon Lawton
      Jon Lawton about 12 years
      Create an answer so I can at least give credit to you in the end ;)
    • C0D3
      C0D3 about 12 years
      Okay, 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? ;)
  • Jon Lawton
    Jon Lawton about 12 years
    The 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
    C0D3 about 12 years
    Now I'm curious too! I wonder why it is not working! Post something if you find out? :)
  • Kiee
    Kiee about 10 years
    Bit 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
    HartleySan over 7 years
    I 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
    zeta about 4 years
    What does this help? "C:\xampp\apache\bin>curl.exe", outputs curl: try 'curl --help' or 'curl --manual' for more information