在 PHP7 windows10 64 位 Apache 2.4 上启用 cURL [英] Enable cURL on PHP7 windows10 64 bit Apache 2.4

查看:37
本文介绍了在 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:

  1. 下载PHP(这些步骤在 7.1 中测试过)
  2. 将 PHP 文件夹添加到 PATH 环境变量
  3. 使用扩展目录的绝对路径更新 php.ini 文件并取消注释 php_curl.dll 和 php_openssl.dll 扩展
  4. 更新 httpd.conf(Apache 配置文件)以加载 PHP 文件夹中的 php7apache2_4.dll 模块并将 PHPIniDir 设置为 PHP 目录
  5. 将 libeay32.dll libssh2.dll 和 ssleay32.dll 复制到 apache/bin(替换现有)
  6. 重启 Apache.
  1. Download PHP (these steps tested with 7.1)
  2. Add PHP folder to PATH environment variable
  3. Update php.ini file with absolute path for extension directory and uncomment php_curl.dll and php_openssl.dll extensions
  4. Update httpd.conf (Apache config file) to load php7apache2_4.dll module in PHP folder and set PHPIniDir to PHP directory
  5. Copy libeay32.dll libssh2.dll and ssleay32.dll into apache/bin (replace existing)
  6. Restart Apache.

这篇关于在 PHP7 windows10 64 位 Apache 2.4 上启用 cURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆