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
package.xml
Archive_Tar-1.4.0/Archive/Tar.php
Archive_Tar-1.4.0/docs/Archive_Tar.txt
# mv /usr/share/pear/Archive/Tar.php /usr/share/pear/Archive/Tar.php.org
# 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

Tags:

Comments

How to perform this under windows OS?

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.