How to enable curl in xampp

I ran into this error below

Fatal error: function call undefined curl_init () in E: \ xampp \ htdocs \ new \ functions.php on line 11

I have already made changes to php.ini . I removed the semicolon before

 ;extension=php_crack.dll extension=php_curl.dll ;extension=php_cvsclient.dll 

and then restart xampp , but still run into the same problem. Are there any other changes. Please let me know if there is. I will be very grateful to you all.

+4
source share
9 answers

If you are using XAMPP, check these two locations:

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

For the string ;extension=php_curl.dll .

Remove the semicolon, save both files, restart Apache and run it again. I hope this works.

+9
source

In Xampp, I found php.ini in this place:

 C:\xampp\php\php.ini 

I deleted the ";" from "; extension = php_curl.dll". It works great.

+4
source

Make sure you find all the php.ini files in XAMPP. (Find the xampp folder in them). As far as I know, XAMPP has two or three, and maybe you included it in the wrong file.

+1
source

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

php.ini can be in several places. To check where the corresponding one is located, go to phpmyadmin (http: // localhost / phpmyadmin), run phpinfo () β†’ the left-side menu.

The left column will indicate half the page: "Configuration file (php.ini)" Path "with the path in the right column.

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

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

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

Remove the ";" split it to become: extension = php_curl.dll

Save file. Restart apache.

Repeat the double check and run phpinfo (). Find the "curl" in the "cURL Support" section. It should say "on."

Hooray!

+1
source

Run phpinfo(); from xampp and enable curl check or not. or get a script from here to check curl.

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

0
source

Check this out: http://www.kanersan.com/blog.php?blogId=45 I had a similar problem besides error messages. Search all over the Internet and all I have found is "edit the php.ini file". I changed all php.ini files, but I was still getting the same error. It turns out that WAMP has visual settings that I believe overwrite php.ini. To enable curl, you left a click on the XAMPP icon in the start menu of the launch β†’ PHP β†’ PHP Settings β†’ php_curl (make sure it is checked).

Perhaps this is your problem.

Hope this helps.

-c0d3

0
source

if you have already unearthed a line from php.ini and still get an error, than you should make sure that this extension file exists in the php folder or not

so check this file

php_curl.dll

in xampp \ php \ exts

if it’s not there, download it from the Internet and insert it there

Restart Apache.

0
source

Steps:

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

Open php.ini and find the extension_dir parameter. Make sure this is the correct and absolute path to your php extension.

An example of the correct extension directory on xampp windows:

 extension_dir=c:\xampp\php\ext 

If you do not know what is going on, try opening the Apache error log and find the text "php_curl" and "Unknown on line 0". This is a typical error message sent when Apache could not load the module.

0
source

Source: https://habr.com/ru/post/1345068/


All Articles