在 xampp 上安装 ssh2

2024-04-12php开发问题
3

本文介绍了在 xampp 上安装 ssh2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在尝试在 xampp

  • Xampp 版本:3.2.1
  • PHP 版本:5.4.19

到目前为止,我已使用以下步骤进行安装:

Until now I have used following step to install:

  1. 下载libssh2.dll文件并复制到c:windowssystem32

php_ssh2.dllphp_ssh2.pdb 文件在ext"(例如 c:xamppphpext) 文件夹;

php_ssh2.dll and php_ssh2.pdb files in the "ext" (e.g c:xamppphpext) folder;

从 php.ini 中的 extention:php_ssh2.dll 这一行中删除 ;.

remove ; from this line extention:php_ssh2.dll in php.ini.

重启xampp

但我在日志文件中收到错误:

But I am getting error in log file:

无法加载动态库php_ssh2.dll

unable to load dynamic library php_ssh2.dll

谁能帮我解决这个问题?

Can anyone help me with this?

推荐答案

你可能错过了一些事情:-

A couple of things you may have missed :-

  • 您需要 php_ssh2 的线程安全 (-ts-) 版本
  • 您需要确保获得 32 位或 64 位版本以匹配您的 PHP/Apache 而不是匹配您的操作系统
  • 您需要与您的 PHP 版本相匹配的 php_ssh2 版本,即 5.4

看看这里下载只有一个使用 VC9 编译的 SSH2 的 32 位版本可用于 PHP5.4,因此您必须确保安装了 32 位版本的 XAMPP.

Having a look here for the download there is only a 32bit version of SSH2 compiled with VC9 available for PHP5.4, so you will have to ensure you have the 32bit version of XAMPP installed.

最后要注意的是,你不需要也不应该这样做,将 php_ssh2.dll 的副本放入 c:windowssystem32 中,因此删除此文件夹中的 dll.PHP 知道从哪里加载其扩展并将文件放入 c:windowssystem32 只会在您想要升级 XAMPP 版本时混淆.

Oh and a final note, you do not need, and should not do, the copy of php_ssh2.dll into the c:windowssystem32 so remove the dll from this folder. PHP knows where to load its extensions from and putting files in c:windowssystem32 will only confuse things when you want to upgrade your version of XAMPP.

这篇关于在 xampp 上安装 ssh2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17