Tuesday, March 20, 2012

How to install Pear on PHP 5.3.0 using WampServer 2.0

First, make sure you have your php set in your Path environnement variable  (Windows).
For example :  ".....;....;C:\wamp\bin\php\php5.3.0"
By default, Pear is not installed on WampServer 2.0 and you try to install via the go-pear.bat, you should get this error :

phar “C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar” does not have a signaturePHP W
arning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236

Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236
Press any key to continue . . .

To avoid this you have to :
  • Open a command prompt (cmd.exe)
  • Go to the folder where the go-pear.phar is (cd C:\wamp\bin\php\php5.3.0\PEAR).
  • Then type php -d phar.require_hash=0 go-pear.phar
  • Follow the straight-forward instructions and you are done

No comments:

Post a Comment