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

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

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

Unread post 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?
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 »

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.
Post Reply