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.ne开发者_开发问答t/go-pear.phar to install PEAR for PHP 5.3 as the old go-pear.bat is now obsolete?
The instructions are to run the following command to install 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?
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:
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:
php -d phar.require_hash=0 go-pear.phar
I do. You are copying all the text and if you see at the bottom are some ASCII characters making the file bad.
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
@Sundance
$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
see alse : System or local when installing PEAR for PHPUnit http://www.geeksengine.com/article/install-pear-on-windows.html
- Right click on this link: https://pear.php.net/go-pear.phar
- Save the file in your PEAR folder.
- Go to the PEAR folder and open a command window
- Run the file with php go-pear.phar
Note: Of course php.exe must be accessible. If if can't be found, add the folder php.exe resides to your PATH.
精彩评论