Page 1 of 1

pear cli not working in php-pear-4.4.0-3.rhfc2.art.i386

Posted: Wed Nov 09, 2005 11:18 am
by breun
I didn't seem to be able to use the pear command line tool. When I ran it I always got this error:

Code: Select all

PHP Fatal error:  Cannot instantiate non-existent class:  pear_command_remote-init in /usr/share/pear/PEAR/Command.php on line 271
I found a bugreport with a fix at http://pear.php.net/bugs/bug.php?id=4740 which says:
joe at joestump dot net wrote:I've found and fixed the problem. In the PEAR/Command
directory there are files like "Auth-init.php" that should
not be automatically included by Command::registerCommands
(). The fix for me was to alter line 263 to look like this:

if ($entry{0} == '.' || substr($entry, -4) !=
'.php' || $entry == 'Common.php' || (strpos($entry,'-') !==
false)) {


Notice the strpos() call. If the file has a dash in it then
don't try loading it. I can only assume Auth and the other
classes include their init files on their own.
This made pear work again. Will this fix be included in the next php-pear release?

Posted: Wed Nov 09, 2005 7:47 pm
by scott
Yeah I had that one on the list, I need to upgrade php anyway. I'll get to it when the build box is up again, Im almost done with it now.