0

在我更改 pear.ini 的默认位置并将我的更改php.ini为 后phar.require_hash -> off,我仍然收到以下错误

11.配置文件名称:e:\

12.CLI路径php.exeE:\software\wamp\bin\php\php5.3.10

1-12, 'all' 或 Enter 继续:开始安装...

PHP致命错误: Call to undefined method PEAR_Error::set()phar://E:/software/wamp/bin/php/php5.3.10/pear/go-pear.phar/PEAR/Start.php on line 301

PHP堆栈跟踪:

PHP 1。{main}() E:\software\wamp\bin\php\php5.3.10\pear\go-pear.phar:0

PHP 2。require_once() E:\software\wamp\bin\php\php5.3.10\pear\go-pear.phar:1236

PHP 3。PEAR_Start_CLI->run() phar://E:/software/wamp/bin/php/php5.3.10/pear/go-pear.phar/index.php:7

PHP 4。PEAR_Start->doInstall() phar://E:/software/wamp/bin/php/php5.3.10/pear/ go-pear.phar/PEAR/Start/CLI.php:57

Fatal error: 
Call to undefined method PEAR_Error::set() in phar://E:/software/wa
mp/bin/php/php5.3.10/pear/go-pear.phar/PEAR/Start.php on line 301

Call Stack:
0.0273    1174752   1. {main}() E:\software\wamp\bin\php\php5.3.10\pear\go-p
ear.phar:0

0.0276    1171720   2. require_once('phar://E:/software/wamp/bin/php/php5.3.
10/pear/go-pear.phar/index.php') E:\software\wamp\bin\php\php5.3.10\pear\go-pear
.phar:1236

0.0622    5496272   3. PEAR_Start_CLI->run() phar://E:/software/wamp/bin/php
/php5.3.10/pear/go-pear.phar/index.php:7

102.2854    5508080   4. PEAR_Start->doInstall() phar://E:/software/wamp/bin/p
hp/php5.3.10/pear/go-pear.phar/PEAR/Start/CLI.php:57

顺便说一句,我在我的 Windows 7 上使用了 wamp 安装程序,所以我没有 go-pear.bar,相反,我下载了 go-pear.phar,并像:php 一样运行它pear/go-pear.phar,谢谢

4

1 回答 1

4

这是我解决问题的方法。可能对某些人有帮助。

local我为范围安装了梨。我没有尝试使用系统范围,因为我遇到了一些权限问题来编辑pear.ini.

我按照下面的文章完成了它。

梨,PHPUnit

go-pear我从以下网址下载了文件,

go-pear.phar

在继续安装之前,我重新启动了系统以正确应用注册表设置PHPUnit

注意: Pear channel forsymfony已从pear channel-discover pear.symfony-project.com移至pear channel-discover pear.symfony.com

于 2012-11-20T09:32:11.767 回答