PEAR error after upgrading to PHP 4.4.2 (art)
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
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
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
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?
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
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
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):
However, pear is still broken! Whatever pear command I try to run, I get this error:
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
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?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
Lemonbit Internet Dedicated Server Management
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
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
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
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?

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
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
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
