1

I have a fairly fresh Debian Testing install, and I am trying to install PEAR / PECL but when I run the command nothing happens. I don't want to install the PEAR package in the Debian repositories because in my experience it is too old. I have installed php5-dev.

Here is what I tried:

$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar

I also tried sudo php go-pear.phar.

$ php -version
PHP 5.3.6-13 with Suhosin-Patch (cli) (built: Jul  4 2011 12:42:46) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

Any thoughts how I can see what is going wrong here?

-- Edit

if I do: php -i | grep phar I get:

Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip  
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

There is no phar.ini in /etc/php5/conf.d/.

-- Edit 2

I have installed PEAR from the Debian repositories now and run pear upgrade. Still interested to figure out why the go-pear.phar installation is not working.

$ whereis php

php: /usr/bin/php /usr/share/php /usr/share/man/man1/php.1.gz

$ whereis pear

pear: /usr/bin/pear /etc/pear
Rudolf Vavruch
  • 1,215
  • 2
  • 11
  • 16
  • Do you mean it didn't show the prompt after typing `php go-pear.phar`? – quanta Aug 31 '11 at 08:10
  • No, I mean it shows the prompt immediately afterward, without showing anything else. Just in case it was a silent install I tried running both pear and pecl. The system did not recognise the commands, so I assume they weren't installed. – Rudolf Vavruch Aug 31 '11 at 17:32
  • What does prompt say? – quanta Sep 01 '11 at 02:04
  • Sorry I misunderstood, I thought you meant the commandline prompt. I enter after the command and am immediately returned to the commandline prompt. There is no output or prompts from the `sudo php go-pear.phar`. This is what I meant when I said nothing happens. – Rudolf Vavruch Sep 01 '11 at 16:37

3 Answers3

2

This is what worked for me. Tested on a Debian Squeeze amd64 installation:

$ php -d suhosin.executor.include.whitelist="phar" go-pear.phar
emegeve
  • 21
  • 2
0

Try this:

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

pear: /usr/bin/pear /etc/pear

It means that the PEAR is already installed. Type pear -version to check its version. Uninstall it first and try again.

quanta
  • 50,327
  • 19
  • 152
  • 213
0

Another interesting situation is if you are listening for remote XDebug connections and pecl is driven by PHP, so it may catch and break the process.

Xedecimal
  • 101
  • 1