Home > Backend Development > PHP Tutorial > Support configuration method of php curl under windows_PHP tutorial

Support configuration method of php curl under windows_PHP tutorial

WBOY
Release: 2016-07-13 10:42:41
Original
1383 people have browsed it

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
 代码如下 复制代码

extension_dir = C:phpextensions

Copy code


extension_dir = C:phpextensions

 代码如下 复制代码

// change the following line from ...
;extension=php_bz2.dll

// ... to
extension=php_bz2.dll

■Enable the extension(s) in php.ini you want to use by uncommenting the extension=php_*.dll lines in php.ini. This is done by deleting the leading ; from the extension you want to load.

Example #1 Enable Bzip2 extension for PHP-Windows

The code is as follows Copy code
// change the following line from ... ;extension=php_bz2.dll // ... to extension=php_bz2.dll
http://www.bkjia.com/PHPjc/633218.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/633218.htmlTechArticleIf we install the php environment but when testing curl_init() it prompts Fatal error: Call to undefined function: curl_init (), this proves that our curl is not configured properly. Let me introduce it below...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template