php - 无法在 XAMPP 中安装 PHPUnit pear 包

标签 php windows-7 phpunit xampp pear

这是我的问题。我已经在 XAMPP 社区论坛中问过这个问题 但没有回复。也许你们中的一些人可以提供帮助。

我正在使用以下配置运行 XAMPP

  • Win 7,32 位
  • xampp-win32-1.7.4-VC6

我想通过 pear 更新 PHPUnit,以便我可以将其用于 Selenium 测试

首先,添加 channel

pear channel-discover pear.phpunit.de

然后我安装包

pear 安装 phpunit/PHPUnit

在这里,我总是收到相同的错误消息 ...

Warning: file_exists (): Unable to find the wrapper "channel" - did you forget to
enable it when you configured PHP? in PEAR \ Downloader \ Package.php on line 1416

Warning: is_file (): Unable to find the wrapper "channel" - did you forget to ena
ble it when you configured PHP? in PEAR \ Downloader \ Package.php on line 1425

Warning: is_file (): Unable to find the wrapper "channel" - did you forget to ena
ble it when you configured PHP? in PEAR \ Downloader \ Package.php on line 1425

我什至尝试完全重新安装 xampp,但没有帮助。

我也做了一个

pear install phpunit/PHPUnit

什么都没有改变。

这可能是由于火瀑布设置造成的吗?

我希望有人能帮我解决这个问题。

最好的问候

杰里米

最佳答案

杰里米,

我在我的电脑环境中有完全相同的设置...

Win 7,32 位 xampp-win32-1.7.4-VC6

  1. 您的系统上安装了什么版本的 pear...键入“pear info pear”(不带引号)。

  2. 您至少需要 1.9.1 版本。如果没有输入“pear upgrade pear”

  3. 提示 - 以管理员身份打开 cmd - 它有很大的不同

  4. 也尝试“pear remote-list -c phpunit”来发现你在 phpunit 中的包

  5. 或者“pear install phpunit/the_package_name”

它对我有用 - 我希望这会有所帮助......还有其他方法,但我发现这是在 Windows 7 中使用 xampp 1.7.4 最有效的方法

关于php - 无法在 XAMPP 中安装 PHPUnit pear 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5160228/

相关文章:

windows - Windows 中的进程间条件变量

audio - 使用VBScript切换当前的有源声音设备?

php - 事件日期的 Solr Facet

javascript - 使用jquery检查div中是否存在文本

php - 链接转换在这里失败了,如何从Youtube提供所有3个链接缩略图?

由于图形处理单元配置(Mac 上的 Windows 7),不支持 Windows Phone 模拟器

PHPUnit 文件命名约定

testing - 模拟数据库连接

php - 通过 ANT 获取和使用父目录

php - 垂直显示列和行