Feb
9
Filed under: Asides | February 9th, 2007

PHP5 Issues

Dreamhost upgrades their servers to PHP 5.2 (newer is better, right?) and most of their PHP5 customers break. WP 2.1 had a lot of workarounds in it just to run under 5.2. That’s stupid. I’m sure there is a perfectly rational reason why PHP core was “forced” to break existing scripts, but constantly shooting your users in the foot isn’t a good way for PHP to stay relevant. (I write this as someone whose entire company and livelihood is based on PHP.)

Possibly related posts:

  1. In Philippines Landed in the Philippines a few hours ago. Looking forward...
  2. New Spring Design Time to break out of your RSS readers: there’s a...
  3. Bryght Closing The End of a Bryght Era. One of the earliest...

35 Responses

  • Anita | February 9th, 2007 @ 7:01 pm | Reply

    This is one of the major reasons why I hate shared hosting (even though I use it). You never know if an upgrade is going to break things for everybody.

  • Heliologue | February 9th, 2007 @ 7:09 pm | Reply

    And another reason why PHP has some trouble appealing to “serious” platforms.

  • Battle of the Sexes | February 9th, 2007 @ 7:35 pm | Reply

    Upgrade time always sucks but it doesn’t really matter what your upgraded when you have a language that is constantly growing and finding new ways to improve itself it is going to break things. WP is a great program but upgrading to 2.1 broke a ton of things for us, but in the long run moving forward is worth it…. I guess the price of progress is a little pain sometimes.

  • Camilo | February 9th, 2007 @ 7:47 pm | Reply

    Well, im in Lonex right now and they use PHP 4.4, my second choise was BlueHost and they offer custom PHP 4 o 5. I think that a technology so important cant be changed so lightly.

  • John | February 9th, 2007 @ 8:06 pm | Reply

    Anita, while dedicated hosting is still much more expensive than shared hosting, it is getting cheaper and cheaper. I just saw some available yesterday for $85 US per month. At that price, it is almost tempting for me. :)

    Matt,

    While I do not have the millions of customers that you do, I can feel a portion of your pain. I too make my living from PHP programming and I have several clients that use Dreamhost. My staff is busy inspecting code as I type this.

  • Daniel Jalkut | February 9th, 2007 @ 8:13 pm | Reply

    So … time to build a python port of WordPress … “just in case” ? :)

  • Chris Casciano | February 9th, 2007 @ 8:51 pm | Reply

    I write this as someone whose entire company and livelihood is based on PHP.

    … strikes me as a another way not to stay relevant, he adds lightheartedly.

  • PatrickQG | February 9th, 2007 @ 9:07 pm | Reply

    My stuff is hosted on a dedicated box that costs just USD$29/month – dedicated hosting can be cheap.

    Of course virtual private servers can be had for a similar price or less, and give you much of the same benefits.

  • Scott Yang | February 9th, 2007 @ 9:21 pm | Reply

    @John — or you can get a $20/month VPS which will be more than enough to run a few WordPress sites. Plus you get the fine control of the software installed, just like a dedicated server.

  • Makkisan | February 9th, 2007 @ 9:56 pm | Reply

    I am hosted on Dreamhost and i have been using PHP5 for a longtime and even with this issue that creeped up i never suffered any hurdles on my site at all. Hmm is it maybe cuz i use a custom php.ini? i dunno but anyway my site has no troubles on either 2.1 or 2.2 bleeding.

  • Nemo | February 9th, 2007 @ 11:14 pm | Reply

    PHP is still a “relevant” language; the lesson here is not to upgrade prematurely just to be “modern”. Security upgrades are one thing, but I’m constantly amazed how many “new feature” releases of just about *any* software has a lot of “features” that most people would call “bugs” – bugs, er, features, that weren’t in previous versions, at that.

    Sometimes, it’s better to be stable, than on the cutting edge.

  • Jonathan | February 9th, 2007 @ 11:16 pm | Reply

    I’ve been using Wordpress on PHP 5.2 for quite some time now, even with Wordpress 1.5.x and it’s always worked just fine.

    Dreamhost shouldn’t have any issues unless they did something funky with the PHP install.

  • Gaming News | February 10th, 2007 @ 3:19 am | Reply

    Is there an ASP port of Wordpress?

  • Michal | February 10th, 2007 @ 7:57 am | Reply

    Every Dreamhost’s customer can choose between PHP 4.x and 5.x solution.

  • RT Cunningham | February 10th, 2007 @ 8:29 am | Reply

    Any port except perl!

  • Walter Jeffries | February 10th, 2007 @ 10:01 am | Reply

    I just send my web host provider a copy of this and asked him to hold off. He is fortunately conservative about upgrades for exactly this reason.

    Cheers,

    -Walter
    Sugar Mountain Farm
    in the mountains of Vermont
    http://SugarMtnFarm.com/blog/
    http://NoNAIS.org

  • CT | February 10th, 2007 @ 10:20 am | Reply

    PHP upgrades on my old host (1&1) consistently knocked out my WP blog. They were rarely ever announced ahead of time. Combine that with legendarily inept customer service (every call resulted in an assessment that I was “running too many scripts”, a stock answer), and I’ve got a new host now.

    With Fantastico installs of WP and the like, isn’t this something that hosts should be putting top-of-mind before mucking with the PHP? Maybe some better communication/coordination for everyone involved would help.

  • alex_t | February 10th, 2007 @ 11:11 am | Reply

    PHP 5.2.1 was released two days ago – hopefully it will fix some of those problems (and will not break WordPress) ;-)

  • Jason | February 10th, 2007 @ 11:28 am | Reply

    I recently had this issue with another shared host provider and it forced me to rewrite some of the admin plugins I was making use of. People could still view my site, but I could not log into the admin pages.

    After working these issues out, I managed to get things working again. It would have been nice to have a warning email, though … I’ve never met a developer that didn’t have a problem with an administrator changing their platform unannounced.

    PHP is a great platform to work with. It’s quick, efficient, and has a huge user base with very intelligent people. Hopefully situations such as this will not be common.

  • Edward O'Connor | February 10th, 2007 @ 12:58 pm | Reply

    I’ve found the Python guys have a really well-thought-out method for staging the introduction of features over several releases.

  • Rust | February 10th, 2007 @ 2:06 pm | Reply

    I still have several v1.5 WP blogs running on PHP 5.2 on both Windows/Apache and Linux/Apache with no problems… maybe these hosts are setting something in the php.ini file that’s breaking compatibility?

    Secondly, and I’m not pointing fingers directly at WP (or Matt) on this one, but it seems that a LOT of open-source web apps that rely on PHP and MySQL will break during certain upgrades due to their curious reliance on using features of those packages that are, in even the current versions, deprecated. WP had a huge problem with MySQL 5 in strict mode for this reason – you’re not supposed to write INSERT queries a certain way, but MySQL 4 allowed it (with warnings). MySQL 5 didn’t.

    So while upgrading the back-end tech can break things, it’s not always the cause of breakage. Sometimes the web applications are using deprecated functions or features, or are doing things incorrectly to begin with.

  • Robert Accettura | February 10th, 2007 @ 5:44 pm | Reply

    This is a problem every shared hosting provider has to deal with. But how long is too long? PHP 5.x has been out for quite some time now. Yet many are still on 4.3, 4.4. When do you make the cutoff?

    Quite a few attempt a transition (such as the ability to still run an older version as a cgi), but that still will cause a few clients to break.

    It’s a complicated issue. It’s not just PHP. MySQL upgrades aren’t always perfect either. For whatever reason a script or two will break when moving between major releases (3.x –> 4.x, 4.x –> 5.x).

    Just part of the pain of web hosting.

    Having a dedicated server is a great solution… kind of. You then have the worry about YOUR old scripts breaking during upgrades, and making sure you keep your box up to date and secure. Web hosts do a lot about these that most people never think of. More often that not, people are either too upgrade happy… or quite lax with updates.

  • Chris Lea | February 10th, 2007 @ 6:33 pm | Reply

    For what it’s worth, we had exactly this same problem when we initially upgraded to 5.2.0 at work on the (gs) Grid Server. Fortunately, rolling back is an extremely fast process for us. It is indeed sad that things can break that substantially for a point release.

  • Simon Willison | February 12th, 2007 @ 3:43 am | Reply

    Virtual servers are definitely the way forward. Unfortunately they require significantly more sysadmin knowledge to manage than a regular shared hosting account – but there’s great scope for hosts to offer pre-packaged VM images with PHP + MySQL + WordPress already set up, for example.

  • Stephanie Booth | February 12th, 2007 @ 6:28 am | Reply

    wow, I guess it was a good thing I was sluggish and haven’t upgraded yet, then!

  • hugh | February 12th, 2007 @ 2:03 pm | Reply

    You can run any version of PHP you want on DreamHost, and it won’t change unless you update it. See http://wiki.dreamhost.com/index.php/Installing_PHP5#Compiling_a_Customized_PHP_5

  • Michael Bishop | February 12th, 2007 @ 2:55 pm | Reply

    What’s the difference between WP upgrading its code that breaks many popular plugins, and a host upgrading it’s version of PHP that breaks popular scripts?

  • Matt | February 12th, 2007 @ 4:58 pm | Reply

    Nothing, they’re both equally bad. That’s why, for example, we reinstated the $table* variables that have been deprecated for 2 years now. However it’s a lot harder for us because WP wasn’t originally designed to build applications on top of, where PHP was. They deal with things at a much more primitive level, where it’s a lot easier to maintain backward compat if it was a priority.

Share your thoughts