Home  >  Article  >  Backend Development  >  How to solve the error reported by php curl_init()?

How to solve the error reported by php curl_init()?

青灯夜游
青灯夜游Original
2020-09-29 11:10:332559browse

Solution: 1. Find the extension and extension_dir items in php.ini and remove the preceding ";"; 2. Copy the php_curl.dll, libeay32.dll and other files in the php directory to system32 on the c drive directory; 3. Restart apache.

How to solve the error reported by php curl_init()?

Recommended: "PHP Video Tutorial"

php website deployment curl_init () function is unavailable or error reporting solution

After installing PHP, execute a statement like $ch = curl_init();, an error message of Call to undefined function curl_init() will appear.

The solution is as follows:

1. Find extension=php_curl.dll in php.ini and remove the ";" in front. php.ini is usually under c:\windows.

2. Find extension_dir = "ext" in php.ini, remove the ";" in front, and change it to extension_dir = "C:\php5\ext".

"C:\php5\ext" is just an example, that is, the path pointed to by the extension must be correct

3. Find php_curl.dll, libeay32.dll, and ssleay32 in the c:\php folder .dll, php5ts.dll four files, copy them to c:\windows\system32.

4. Restart the apache service and restart the server.

Related recommendations: php training

The above is the detailed content of How to solve the error reported by php 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