Pear doesn't work properly after upgrade to PHP 5.6

After upgrade to PHP 5.6 Pear stopped to work properly giving lot's of "Download of "pear/package_name" succeeded, but it is not a valid package archive". To fix this I had to:

# pear upgrade Archive_Tar
downloading Archive_Tar-1.4.0.tgz ...
Starting to download Archive_Tar-1.4.0.tgz (x bytes)
.......done: x bytes
could not extract the package.xml file from "/tmp/pear/download/Archive_Tar-1.4.0.tgz"
Download of "pear/Archive_Tar" succeeded, but it is not a valid package archive
Error: cannot download "pear/Archive_Tar"
Download failed
upgrade failed
# cd /tmp/pear/download/
# tar -zxvf Archive_Tar-1.4.0.tgz
# mv /usr/share/pear/Archive/Tar.php /usr/share/pear/Archive/
# cp /tmp/pear/download/Archive_Tar-1.4.0/Archive/Tar.php /usr/share/pear/Archive/

and now I can run 'pear upgrade-all' without any issues.

Alternatviely, after upgrading to PHP 5.6 you can completely remove and re-install PEAR from remi repository:

yum erase php-pear
yum install --enablerepo=remi --enablerepo=remi-php56 php-pear


Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
To prevent automated spam submissions leave this field empty.