How to fix: Call to undefined function curl_init in PHP



and if you use curl in php, and encounter this problem “Call to undefined function curl_init”, you can fix this question like this: php.ini file.

If you do not know where this file is , please create a file like “1.php” in your www directory.

then input this source code in this file.

<?php phpinfo();?>

then open this file in your browser. Browsing the result, you will find where php.ini file is.

2.find ;extension=php_curl.dll this item. and clear ‘;’

3.restart apache

If you do all of above, and question exists. you can continue to do this:

4.find “extension_dir”, and in directory of this value, you can check whether there exists php_curl.dll.

If not, you have to copy libeay32.dll and ssleay32.dll in php directory into c:\windows\system32.

5.restart apache.