使用phar在Windows 7上安装PEAR。

时间:2022-06-29 07:17:34

I'm trying to install PEAR for use with Wamp 2.1. The package does not come with any pear installation. I have read that you need to use http://pear.php.net/go-pear.phar to install PEAR for PHP 5.3 as the old go-pear.bat is now obsolete?

我正在安装PEAR用于Wamp 2.1。这个包没有任何pear安装。我已经看到您需要使用http://pear.php.net/go-pear.phar为PHP 5.3安装PEAR作为旧的go-pear。蝙蝠现在过时了吗?

The instructions are to run the following command to install PEAR;

指令是运行以下命令来安装PEAR;

php -d phar.require_hash=0 PEAR/go-pear.phar

However, this is resulting in the following error;

但是,这会导致以下错误;

manifest cannot be larger than 100 MB in phar "D:\wamp2\bin\php\php5.3.4\PEAR\go-pear.phar"

I'm sure this is due to a php setting I have correct somewhere, anyone have any ideas?

我确定这是由于我在某个地方有一个php设置,有人知道吗?

3 个解决方案

#1


20  

Even with "save as" directly from the browser I got the same error. The solution for me was to download it directly through the command line:

即使直接从浏览器输入“save as”,我也会得到相同的错误。我的解决方案是直接通过命令行下载:

cd C:/php/bin/
curl -OL http://pear.php.net/go-pear.phar

this properly downloaded the .phar file and after the installation properly started with:

这是正确地下载。phar文件,并在安装后正确地开始:

php -d phar.require_hash=0 go-pear.phar

#2


14  

I do. You are copying all the text and if you see at the bottom are some ASCII characters making the file bad.

我做的事。你复制了所有的文本,如果你看到底部有一些ASCII字符使文件变坏。

Hope i helped you

希望我帮助你

Edit: you have to Download the file go-pear.phar from http://pear.php.net/go-pear.phar use some download manager then save as go-pear.phar into WampDir\php\PEAR\go-pear.phar

编辑:你必须下载文件go-pear。phar来自http://pear.php.net/go-pear.phar使用下载管理器保存为go-pear。phar成WampDir \ php \ \ go-pear.phar梨

@Sundance

@Sundance

#3


2  

$file = 'http://pear.php.net/go-pear.phar';
$file2 = 'C:\wamp\bin\php\php5.5.12\go-pear.phar';
// Open the file to get existing content
$current = file_get_contents($file);
// Write the contents back to the file

file_put_contents($file2, $current);

insert into cmd : php go-pear.phar

插入到cmd: php go-pear.phar

see alse : System or local when installing PEAR for PHPUnit http://www.geeksengine.com/article/install-pear-on-windows.html

请参见alse:在为PHPUnit安装PEAR时系统或本地,http://www.geeksengine.com/article/install-pear-windows.html。

#1


20  

Even with "save as" directly from the browser I got the same error. The solution for me was to download it directly through the command line:

即使直接从浏览器输入“save as”,我也会得到相同的错误。我的解决方案是直接通过命令行下载:

cd C:/php/bin/
curl -OL http://pear.php.net/go-pear.phar

this properly downloaded the .phar file and after the installation properly started with:

这是正确地下载。phar文件,并在安装后正确地开始:

php -d phar.require_hash=0 go-pear.phar

#2


14  

I do. You are copying all the text and if you see at the bottom are some ASCII characters making the file bad.

我做的事。你复制了所有的文本,如果你看到底部有一些ASCII字符使文件变坏。

Hope i helped you

希望我帮助你

Edit: you have to Download the file go-pear.phar from http://pear.php.net/go-pear.phar use some download manager then save as go-pear.phar into WampDir\php\PEAR\go-pear.phar

编辑:你必须下载文件go-pear。phar来自http://pear.php.net/go-pear.phar使用下载管理器保存为go-pear。phar成WampDir \ php \ \ go-pear.phar梨

@Sundance

@Sundance

#3


2  

$file = 'http://pear.php.net/go-pear.phar';
$file2 = 'C:\wamp\bin\php\php5.5.12\go-pear.phar';
// Open the file to get existing content
$current = file_get_contents($file);
// Write the contents back to the file

file_put_contents($file2, $current);

insert into cmd : php go-pear.phar

插入到cmd: php go-pear.phar

see alse : System or local when installing PEAR for PHPUnit http://www.geeksengine.com/article/install-pear-on-windows.html

请参见alse:在为PHPUnit安装PEAR时系统或本地,http://www.geeksengine.com/article/install-pear-windows.html。