Pear broken after PHP downgrade

Posted on

Pear broken after PHP downgrade – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, ubuntu, php, pear, .

I downgraded PHP from 5.3 to 5.2 by doing something similar to mrkandy’s script
Everything works fine except pear. pear list shows the pear packages I installed before the downgrade and they all work. Pear itself doesn’t though. I can no longer install or upgrade any packages and there are no errors displayed.
The .tgz’s are downloaded and I can see them in /build/buildd/php5-5.2.10.dfsg.1/pear-build-download/ but that’s as far as it goes, nothing is installed.
I can’t seem to find any log of the process and I don’t know how to run pear install in verbose mode (if there is such a thing).
Does anybody have any hints for me, some threads to pull?

I am using Linux Mint 9 (a lot like ubuntu 10.04)

$ pear config-show
Configuration (channel
Auto-discover new Channels     auto_discover    <not set>
Default Channel                default_channel
HTTP Proxy Server Address      http_proxy       <not set>
PEAR server [DEPRECATED]       master_server
Default Channel Mirror         preferred_mirror
Remote Configuration File      remote_config    <not set>
PEAR executables directory     bin_dir          /usr/bin
PEAR documentation directory   doc_dir          /usr/share/php/doc
PHP extension directory        ext_dir          /usr/lib/php5/20060613+lfs
PEAR directory                 php_dir          /usr/share/php
PEAR Installer cache directory cache_dir        /tmp/pear/cache
PEAR configuration file        cfg_dir          /usr/share/php/cfg
PEAR data directory            data_dir         /usr/share/php/data
PEAR Installer download        download_dir     /build/buildd/php5-5.2.10.dfsg.1/pear-build-download
PHP CLI/CGI binary             php_bin          /usr/bin/php
php.ini location               php_ini          <not set>
--program-prefix passed to     php_prefix       <not set>
PHP's ./configure
--program-suffix passed to     php_suffix       <not set>
PHP's ./configure
PEAR Installer temp directory  temp_dir         /tmp/pear/temp
PEAR test directory            test_dir         /usr/share/php/test
PEAR www files directory       www_dir          /usr/share/php/htdocs
Cache TimeToLive               cache_ttl        3600
Preferred Package State        preferred_state  stable
Unix file mask                 umask            22
Debug Log Level                verbose          1
PEAR password (for             password         <not set>
Signature Handling Program     sig_bin          /usr/bin/gpg
Signature Key Directory        sig_keydir       /etc/pear/pearkeys
Signature Key Id               sig_keyid        <not set>
Package Signature Type         sig_type         gpg
PEAR username (for             username         <not set>
User Configuration File        Filename         /home/clive/.pearrc
System Configuration File      Filename         /etc/pear/pear.conf

Solution :

I’ve had the same issue with Ubuntu 10.04. All I had to do was to upgrade PEAR with -Z option.

sudo pear upgrade -Z PEAR

worked like a charm for me.

And if you want to install PHPUnit afterwards use the same -Z option.

sudo pear install -Z phpunit/PHPUnit

Leave a Reply

Your email address will not be published. Required fields are marked *