PEAR error after upgrading to PHP 4.4.2 (art)

Support/Development for PHP
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

No one have a fix for PEAR with art's PHP 4.4.2 rpms?
Lemonbit Internet Dedicated Server Management
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Sorry for bumping this one once more, but is there really no one who tried to get PEAR working on PHP 4.4.2 and succeeded/failed?
Lemonbit Internet Dedicated Server Management
Griffith
Forum User
Forum User
Posts: 95
Joined: Tue Dec 07, 2004 1:32 pm

Unread post by Griffith »

I'm also getting the same error.. would be nice if there were a fix for this soon?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

php 4.4.x is no longer maintained, I recommend upgrading to php 5 from the atomic-testing channel
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I hear a lot of sites do break when upgrading to PHP 5. I guess I'll downgrade to the distribution's own PHP releases then.

But Scott, if you recommend installing PHP 5.0 over 4.4, why is it still in the testing channel?
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

I want to give people pleanty of warning before I do it.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I downgraded to Fedora Legacy's PHP 4.3.11 packages on a FC3 machine in the hope of getting pear to work again. I now have these php packages installed (no more .art packages as you can see):

Code: Select all

# rpm -qa | grep ^php- | sort
php-4.3.11-2.8
php-domxml-4.3.11-2.8
php-gd-4.3.11-2.8
php-imap-4.3.11-2.8
php-mbstring-4.3.11-2.8
php-mysql-4.3.11-2.8
php-pear-4.3.11-2.8
php-pgsql-4.3.11-2.8
php-xmlrpc-4.3.11-2.8
However, pear is still broken! Whatever pear command I try to run, I get this error:
PHP Fatal error: Cannot instantiate non-existent class: pear_command_mirror-init in /usr/share/pear/PEAR/Command.php on line 271

Fatal error: Cannot instantiate non-existent class: pear_command_mirror-init in /usr/share/pear/PEAR/Command.php on line 271
Line 271 of Command.php doesn't tell me much. Any idea what I can do to get the pear command to work again on a FC3 box after having 4.4.2 from ART installed?
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Man welcome to my world :P This is why I just gave up on my php design, its a full time job.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Absolutely no clue what could be causing this error while I have replaced all of your 4.4.2 art packages with Fedora Legacy's 4.3.11? I have a customer that wants a particular pear module and I just can't install it for him because the pear command broke when I installed 4.4.2 from the atomic channel. And now even downgrading doesn't seem to fix the problem...
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

No I gave up on 4.x, I dont even want to think about it any more
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I fixed it by uninstalling the php-pear package (using --nodeps) and removing all that was left in /usr/share/pear/ after that. Then I did a yum install php-pear and all is fine again. :)

I think the problem was a bunch of *-init.php files in /usr/share/pear/PEAR/Command/. When I ran rpm -qf on them rpm said they weren't owned by any package. Maybe (re)moving just those files will fix pear for others?
Lemonbit Internet Dedicated Server Management
DMZ
Forum User
Forum User
Posts: 8
Joined: Fri Jun 17, 2005 9:05 pm

Unread post by DMZ »

This is a pretty old and obvious one.

The official release of PHP 4.4.2 had PEAR broken due to incorrect md5 checksums. One solution for the RPM is to copy the extensions from pear.php.net over the bad PHP 'official' release, so in the spec file:

Source2: Archive_Tar-1.3.1.tar
Source3: Console_Getopt-1.2.tar
Source4: HTML_Template_IT-1.1.4.tar

And then at the end of the %prep stage copy them in:

%{__cp} -p %{SOURCE2} pear/packages/Archive_Tar-stable.tar
%{__cp} -p %{SOURCE3} pear/packages/Console_Getopt-stable.tar
%{__cp} -p %{SOURCE4} pear/packages/HTML_Template_IT-stable.tar

Of course, bumping the PHP version to 4.4.4 is easier :wink:
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

I did a 4.4.4 release for the ASL users
Post Reply