PHP prompts call to undefined function curl

Source: Internet
Author: User
Tags curl functions linux

This is often the case when using PHP Curl series functions, which are uploaded to the server in a good program for local debugging, and are reported in various errors, such as call to undefined function curl_init () ... This is the most common, then what to do about this error?

Because the Curl series functions belong to a system-level function, it is suggested that the error that did not find the Curl_init function is generally caused by not opening the associated extension. This time we will know what to do, open the php curl extension.

The solution under Windows+apache:

Locate the php.ini configuration file and find it in the file:

Extension=php_curl.dll

This sentence checks to see if there is a semicolon (;), if any, to remove it.

In addition to ensure that the PHP installation directory under the EXT directory under the Php_curl.dll,,libeay32.dll and Ssleay32.dll these three files, if not, you need to download and copy to the Internet just said directory.

Then restart Apache.

The solution under Linux+apache:

Need to install Curl software package, because I am not too familiar with Linux, this process is not described in detail.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.