Call to undefined function curl_init().?
If you're on Windows:
Go to your php.ini file and remove the ;
mark from the beginning of the following line:
;extension=php_curl.dll
After you have saved the file you must restart your HTTP server software (e.g. Apache) before this can take effect.
For Ubuntu 13.0 and above, simply use the debundled package. In a terminal type the following to install it and do not forgot to restart server.
sudo apt-get install php-curl
Or if you're using the old PHP5
sudo apt-get install php5-curl
or
sudo apt-get install php5.6-curl
Then restart apache to activate the package with
sudo service apache2 restart
Fatal Error Call to undefined function curl_init()
I was able to finally solve this issue by finding a file in my PHP root folder called libssh2.dll and copy/paste into the Apache bin folder. Once I did that, curl is now enabled, and I no longer get the error in question. I'm getting other errors, but that's for another question.
Call to undefined function curl_init() even it is enabled in php7
I've had similar problem with curl after upgrade to XX (16.04).
After reinstalling curl with:
sudo apt-get install php-curl
And server restart
sudo service apache2 restart
everything went back to normal :)
Call to undefined function curl_init() after updating PHP version in WAMP
This is very dumb of me, but I finally solved it, leaving this answer here in case anyone struggles with the same problem.
I needed to update Apache from 2.4.33 to 2.4.47. Seems like the .33 version had problems with loading the cURL extension in PHP 7.4 for some reason.
Related Topics
Super Fast Getimagesize in PHP
How to Emulate a Get Request Exactly Like a Web Browser
How to Re-Index the Values of an Array in PHP
Does MySQL_Real_Escape_String() Fully Protect Against SQL Injection
Sort and Display Directory List Alphabetically Using Opendir() in PHP
Why Use a Psr-0 or Psr-4 Autoload in Composer If Classmap Is Actually Faster
What Exactly Is Path_Info in PHP
Send Post Request Using Volley and Receive in PHP
How to Get Url of Current Page in PHP
Show Image Using File_Get_Contents
Laravel Eloquent Select All Rows With Max Created_At
How to Best Configure PHP to Handle a Utf-8 Website
Prevent Sent Emails Treated as Junk Mails Using PHP Mail Function
PHP Mkdir: Permission Denied Problem
Catching Exceptions from Guzzle
PHP How to Start an External Program Running - Having Trouble With System and Exec