pear1.9下安装phpunit3.4

来源:互联网 发布:淘宝企业店铺怎么避税 编辑:程序博客网 时间:2024/05/20 09:27

It had a strange problem running the above pear command, with an error saying:

 

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 143 bytes) in /usr/share/php/PEAR/PackageFile/v2.php on line 1772

 

 

Others have encountered this problem, and the workaround as provided in this page,

is to adjust the memory inside the script (it does not work in the php.ini).

Edit the /pear/pearcmd.php, and add:

@ini_set('memory_limit', '16M');

 

 

pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear install phpunit/PHPUnit

 


Microsoft Windows [版本 5.2.3790]
(C) 版权所有 1985-2003 Microsoft Corp.

F:/wamp/php>pear channel-discover pear.phpunit.de
Channel "pear.phpunit.de" is already initialized

F:/wamp/php>pear channel-discover pear.symfony-project.com
Channel "pear.symfony-project.com" is already initialized

F:/wamp/php>pear install phpunit/PHPUnit
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, symfony/Y
AML, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "symfony/YAML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_mysql"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.15.tgz ...
Starting to download PHPUnit-3.4.15.tgz (255,036 bytes)
.............done: 255,036 bytes

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3
5 bytes) in F:/wamp/php/PEAR/PEAR/PackageFile/v2/Validator.php on line 420

F:/wamp/php>pear channel-discover pear.phpunit.de
Channel "pear.phpunit.de" is already initialized

F:/wamp/php>pear channel-discover pear.symfony-project.com
Channel "pear.symfony-project.com" is already initialized

F:/wamp/php>pear install phpunit/PHPUnit
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, symfony/Y
AML, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "symfony/YAML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_mysql"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.15.tgz ...
Starting to download PHPUnit-3.4.15.tgz (255,036 bytes)
.....................................................done: 255,036 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.15

F:/wamp/php>