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

35 thoughts on “PHP5 Issues

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

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

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

  4. 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. 🙂


    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.

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

  6. @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.

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

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

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

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

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

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

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

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

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

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