Installing PEAR on Windows 7 using phar
Solution 1
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
Solution 2
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
Solution 3
$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
Dan Steele
Updated on July 19, 2022Comments
-
Dan Steele almost 2 years
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?
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?
-
markus about 13 yearsThat will result in a warning that the installed PHP version is too new for this file and you have to go back to the phar, which seems to be corrupted.
-
Sundance about 13 yearsDont know why you get that "warning", im had the problem that Dan Steele and i can fixed it doeing what i said
-
LeGEC about 13 yearsWorked for me too. I had the same warning, and updating the "go-pear.phar" file with the last version found at "pear.php.net/go-pear.phar" solved it for me.
-
Flion over 8 yearssame warning but this solution didnt solve it on WAMP 2.5 PHP 5.5.12
-
PellucidWombat over 6 yearsDitto. Copying and pasting the source code does not work. Downloading it directly with cURL gives you a valid .phar file to install.