So today I want to install one new package from PEAR on my laptop. Before doing so I decided to upgrade the packages I had already installed. The upgrade went smoothly enough, but once it was complete, the PEAR command line program would no longer work. Whenever I run pear.bat now, I get the following helpful error messages:
Warning: array_shift(): The argument should be an array in pearcmd.php on line 54 Console_Getopt: Could not read cmd args (register_argc_argv=Off?)
Great. At a loss for what to do, I immediately run out and upgrade to PHP 4.4.0. When I have the upgrade complete, I install PEAR and find that the same problem exists. I can only assume then that the latest version of PEAR is currently broken for all Windows users. Does any other conclusion really make sense? And of course when a fix is released I won’t be able to install it because PEAR is actually used to install upgrades to itself.
And to think that I’ve been known to complain about the difficulty of managing JAR files in the Java world.
August 25, 2005 at 11:18 am
Hey, man! Whatever happened to …
http://rc3.org/2005/05/entry_6993.php “Well, I went in and replaced their code ~. That says something for the power of scripting languages, if nothing else.”
So, why not hack the pear code to work, yourself?
Cheers, Bryan
August 25, 2005 at 1:10 pm
Does this help?
http://www.php-resources.org/help/article-php.pear.webmaster-2926.php
August 25, 2005 at 3:47 pm
register_argc_argv=Off?
Did you ponder the question it asked you? Check your php.ini and verify that register_argc_argv is indeed turned “On”.
August 25, 2005 at 8:37 pm
“So today I want to install one new package from PEAR on my laptop.”
See, this was your first mistake. 😉
In all seriousness, I wish I could help. But I’ve avoided Pear as much as possible for the last several years for various reasons, not the least of which are issues like this one.
Postscript: You can jump through some hoops and install Pear packages manually. It’s not optimal, but it will get you around the current issue if you’re in a make-or-break sort of situation.
http://www.php-editors.com/pear_manual/p_installation.manually.html
August 27, 2005 at 10:03 am
I reckon it was the second mistake–the first being
“Whenever I run pear.bat now…”
😉
August 29, 2005 at 7:57 am
In answer to the comments, I could have gone down the rabbit hole and tried to fix PEAR, but I was about to head out of town, and the PEAR problem was six degrees removed from the actual problem I was trying to solve. Given that I had about two hours to solve the real problem that absolutely had to be fixed, trying to figure out why PEAR couldn’t upgrade itself properly was not on the agenda.