If we have installed the PHP environment but when testing curl_init() we are prompted with Fatal error: Call to undefined function: curl_init(). This proves that our curl is not configured properly. Let me introduce it below.
Call curl_init() function test, the error message is as follows:
Fatal error: Call to undefined function: curl_init()
windowsxp 2003
First of all, make sure your PHP is ready for use. This article does not explain the PHP configuration under Windows, but only adds the extension of curl.
1. Copy the two files libeay32.dll and ssleay32.dll in the PHP directory to the c:/windows/system32 directory.
2. Modify php.ini. Remove the semicolon in front of extension = php_curl.dll.
3. Restart apache
Finish!
windows 7/8/vasta
■You will need to change the extension_dir setting to point to the directory where your extensions lives, or where you have placed your php_*.dll files. For example:
The code is as follows
|
Copy code
|
||||
extension_dir = C:phpextensions
|
Example #1 Enable Bzip2 extension for PHP-Windows