how to enable curl in xampp

纵饮孤独 提交于 2019-12-05 19:45:45
Shakir

If you are using XAMPP, check these two locations:

  • C:\xampp\xampplite\apache\bin\php.ini
  • C:\xampp\xampplite\php\php.ini

For the line ;extension=php_curl.dll.

Remove the semicolon, save both files, restart your Apache and then run it again. I hope it will work.

Ashvintest Gargav

In Xampp i've found php.ini at this location:

C:\xampp\php\php.ini

I've removed ";" from ";extension=php_curl.dll" line. It works fine.

Make sure you locate all the php.ini files in XAMPP. (Search your xampp folder for them). As far as I know, XAMPP has two or three, and it may be that you've enabled it in the incorrect file.

As you said, we'll uncomment the line ";extension=php_curl.dll" in php.ini

php.ini can be in multiple places. To check where the pertinent one is, go to phpmyadmin (http://localhost/phpmyadmin) run phpinfo() -> left hand side menu.

It'll say a half page down in the left column: "Configuration File (php.ini) Path" with the path in the right column.

Or just search the page for php.ini (Ctrl+F)

Different versions of xampp had php.ini if in different directories, and some have 3 versions of the file in different places. Many tutorials say to change all of them in case you change settings/uses later.

Open file in text editor and find the line (via search) ;extension=php_curl.dll

Remove the ";" to uncomment it, so it becomes: extension=php_curl.dll

Save file. Restart apache.

Double check and run phpinfo() again. Search for "curl" Under "cURL support" It should say "enabled."

Cheers!

Run the phpinfo(); from xampp and check out curl is enabled or not. or get script from here to check curl is enabled.

http://www.webune.com/forums/how-to-check-curl-installed-in-php.html

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

shyammakwana.me

if you have already uncommented line from php.ini and still getting error than you should make sure that this extension file is exists in php folder or not

so check for this file

php_curl.dll

in xampp\php\exts

if it's not there than download it from internet and paste it to there

Restart Apache.

Harjinder singh

Steps:

  1. Go to XAMPP folder: C:\xampp\php
  2. Find php.ini file
  3. Open it and remove semicolon before php_curl.dll, so, replace ;extension=php_curl.dll with extension=php_curl.dll
  4. Restart Apache before refreshing the page
manuelbcd

Open php.ini and look for "extension_dir" parameter. Check that it is the correct and absolute path to your php extension dir.

Example of a correct extension directory on windows xampp:

extension_dir=c:\xampp\php\ext

If you are not sure what is happening try opening Apache error log and look for the text "php_curl" and "Unknown on line 0". This is the typical error message dispatched when Apache cannot load a module.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!