Call to undefined function curl_init().?

PhpCurl

Php Problem Overview


When i am going to implement Authorize.net payment gateway. However, I got this error:

> Call to undefined function curl_init()

Please let me know what is wrong in it.

Php Solutions


Solution 1 - Php

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

Solution 2 - Php

The CURL extension ext/curl is not installed or enabled in your PHP installation. Check the manual for information on how to install or enable CURL on your system.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPramod Kumar SharmaView Question on Stackoverflow
Solution 1 - Phprahim asgariView Answer on Stackoverflow
Solution 2 - PhpStefan GehrigView Answer on Stackoverflow