无法在Windows 7上使用WAMP安装PEAR

时间:2012-04-08 13:47:45

标签: windows-7 install wamp pear

我更改了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,谢谢< / p>

1 个答案:

答案 0 :(得分:4)

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

我为local范围安装了pear。我没有尝试使用系统范围,因为我遇到了一些许可问题需要编辑pear.ini

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

PEAR, PHPUnit

我从以下网址

下载了go-pear文件

go-pear.phar

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

注意: Pear channel的{​​{1}}已从symfony移至pear channel-discover pear.symfony-project.com