Home >Backend Development >PHP Problem >How to solve the error reported by php curl_init()?
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.
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!