Home  >  Article  >  Backend Development  >  How Do I Fix the \"Call to undefined function curl_init()\"?

How Do I Fix the \"Call to undefined function curl_init()\"?

Barbara Streisand
Barbara StreisandOriginal
2024-11-03 15:10:03673browse

How Do I Fix the

Troubleshooting "Call to undefined function curl_init()"?

Issue:
When integrating Authorize.net payment gateway, developers encounter the error "Call to undefined function curl_init()".

Resolution:

Windows:

  • Locate your php.ini file.
  • Remove the semi-colon (;) from the following line:

    ;extension=php_curl.dll
  • Restart your HTTP server (e.g., Apache).

Ubuntu 13.0 and Above:

  • Bundled package:

    • Install php-curl:

      sudo apt-get install php-curl
  • Debundled package:

    • Install the debundled package:

      sudo apt-get install php5-curl

      or

      sudo apt-get install php5.6-curl
    • Restart Apache:

      sudo service apache2 restart

The above is the detailed content of How Do I Fix the \"Call to undefined function curl_init()\"?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn