在 PHP7 windows10 64 位 Apache 2.4 上启用 cURL [英] Enable cURL on PHP7 windows10 64 bit Apache 2.4
本文介绍了在 PHP7 windows10 64 位 Apache 2.4 上启用 cURL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Windows10 64 位Apache 2.4.25 (Win64)PHP 7.1.0-Win32-VC14-x64
I am using Windows10 64 bit Apache 2.4.25 (Win64) PHP 7.1.0-Win32-VC14-x64
当我尝试调用 curl_init() 函数时,我收到一条错误消息调用未定义的函数 curl_init()"尝试关注
when i try calling curl_init() function, i get an error saying "Call to undefined function curl_init()" tried following
- 复制 ssleay32.dll &libeay32.dll &php7ts.dll 到 apache/bin 文件夹
- 正确设置路径以包含上述文件C:/PHP;"
非常感谢任何帮助.
推荐答案
以下是从获取PHP到启用cURL的步骤:
Here are the steps from obtaining PHP to enabling cURL:
- 下载PHP(这些步骤在 7.1 中测试过)
- 将 PHP 文件夹添加到 PATH 环境变量
- 使用扩展目录的绝对路径更新 php.ini 文件并取消注释 php_curl.dll 和 php_openssl.dll 扩展
- 更新 httpd.conf(Apache 配置文件)以加载 PHP 文件夹中的 php7apache2_4.dll 模块并将 PHPIniDir 设置为 PHP 目录
- 将 libeay32.dll libssh2.dll 和 ssleay32.dll 复制到 apache/bin(替换现有)
- 重启 Apache.
- Download PHP (these steps tested with 7.1)
- Add PHP folder to PATH environment variable
- Update php.ini file with absolute path for extension directory and uncomment php_curl.dll and php_openssl.dll extensions
- Update httpd.conf (Apache config file) to load php7apache2_4.dll module in PHP folder and set PHPIniDir to PHP directory
- Copy libeay32.dll libssh2.dll and ssleay32.dll into apache/bin (replace existing)
- Restart Apache.
这篇关于在 PHP7 windows10 64 位 Apache 2.4 上启用 cURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文