For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > December 2005 > Repairing PEAR









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Repairing PEAR
Jeff Moore

2005-12-11, 7:12 pm

Hello,

I seem to have broken my PEAR installation somehow. I'm getting:

Fatal error: Cannot instantiate non-existent class:
pear_command_auth-init in /usr/lib/php/PEAR/Command.php on line 271

I think the last thing I did was upgrade the pear package to the latest
release. I didn't discover the problem until a few ws later, so i'm
not entirely sure what I did. Any advise on repairing my PEAR
installation would be appreciated.

Thanks,

Jeff Moore
Greg Beaver

2005-12-11, 10:11 pm

Jeff Moore wrote:
> Hello,
>
> I seem to have broken my PEAR installation somehow. I'm getting:
>
> Fatal error: Cannot instantiate non-existent class:
> pear_command_auth-init in /usr/lib/php/PEAR/Command.php on line 271
>
> I think the last thing I did was upgrade the pear package to the latest
> release. I didn't discover the problem until a few ws later, so i'm
> not entirely sure what I did. Any advise on repairing my PEAR
> installation would be appreciated.


Let me guess: you upgraded via a method other than "pear upgrade PEAR",
i.e. a debian package/gentoo ebuild/Grunklix Nuggetdistro :)

Regardless of the cause, you are suffering from 2 issues:

1) your PEAR/Command.php is actually from PEAR 1.3.6 or earlier (check
the $Id$ tag, it should be

$Id: Command.php,v 1.35 2005/11/01 05:39:23 cellog Exp $

2) to fix this, run

sudo rm /usr/lib/php/PEAR/Command/*-init.php
sudo pear upgrade --force PEAR

or as root s/sudo//

or, if you're using PHP 5.1.0 or newer, simply:

sudo rm -rf /usr/lib/php/.registry
sudo make install-pear

The best advice is to report a bug to the maintainer of the port, this
is a problem that has crept up repeatedly and is out of our hands
because I have no comprehension of why someone would try to mix up two
completely incompatible versions of PEAR and then call it a good thing...

Greg
Jeff Moore

2005-12-12, 7:12 pm


On Dec 11, 2005, at 10:35 PM, Greg Beaver wrote:

> Jeff Moore wrote:
> Let me guess: you upgraded via a method other than "pear upgrade PEAR",
> i.e. a debian package/gentoo ebuild/Grunklix Nuggetdistro :)


I did install a security update just before it stopped working. I
didn't realize it would downgrade PEAR, tho.

> 2) to fix this, run
>
> sudo rm /usr/lib/php/PEAR/Command/*-init.php
> sudo pear upgrade --force PEAR


Worked great. Thanks.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com