Home > Backend Development > PHP Tutorial > How Do I Fix the \'Call to undefined function curl_init()\'?

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

Barbara Streisand
Release: 2024-11-03 15:10:03
Original
740 people have browsed it

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
    Copy after login
  • Restart your HTTP server (e.g., Apache).

Ubuntu 13.0 and Above:

  • Bundled package:

    • Install php-curl:

      sudo apt-get install php-curl
      Copy after login
  • Debundled package:

    • Install the debundled package:

      sudo apt-get install php5-curl
      Copy after login

      or

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

      sudo service apache2 restart
      Copy after login

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template