rc3.org

Strong opinions, weakly held

Dear PHP, you suck and I hate you

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.

6 Comments

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

  2. 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”.

  3. “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

  4. “So today I want to install one new package from >PEAR on my laptop.”

    See, this was your first mistake. 😉

    I reckon it was the second mistake–the first being

    “Whenever I run pear.bat now…”

    😉

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

Leave a Reply

Your email address will not be published.

*

© 2024 rc3.org

Theme by Anders NorenUp ↑