PHP 5.x – What is your server running?

Ilia Alshanetsky – an active PHP developer, has posted an interesting post asking opinions about upgrading from PHP 4.x to PHP 5.x The comments seem to host a range of excuses, like the chicken and the egg application quandry ( Popular PHP applications don’t require PHP 5 so hosters don’t upgrade so popular PHP applications don’t require PHP 5.x – do you see the infinite recursion?), the cost in both time and money of running and testing “legacy code” – even blaming Linux distributions.

I’ve personally been using PHP 5 since the first beta, and can’t even remember how to code for 4 anymore. I’ve also had some surprisingly pleasant experiences moving procedural style applications from 4 to 5. I’ve also had a horror story featuring much search and replace dealing with an upgrade of a predominately OO application.

So what are your thoughts on PHP 5.x? Are hosters the problem? Or applications? Or is it just word of mouth marketing that needs to bring the new version into the spotlight? PHP 4.x is dead, and as Ilia states – “PHP 4 is basically in low maintenance mode with very few developers even looking at it. The only things going into it are security fixes are [sic] critical bug fixes. Even that may go away once the current maintainer Derick Rethans loses interest”

What is your server running today?  Upgrading isn’t as hard as you might think.  There’s even a book to help you out – although it’s probably easier just to read the manual.

Posted in News
4 comments on “PHP 5.x – What is your server running?
  1. nu says:

    I absolutely agree. At work we upgraded servers and applications in the precise moment it appeared an stable version of PHP5 for the Linux distribution we use. I didn’t found a reason not to do it, as that step supposed a great improvement on performance and capabilities.
    The conversion wasn’t painful at all, as you say, it was much easier than it seemed. I think that the work of mantaining applications programmed in a non evolutive language costs much more in the long run.

  2. aaa says:

    All my servers are runnining PHP 4.* versions. But, as you said – it is not a problem to upgrade, my biggest problem are clients. If upgrade – I will have to mantain two branches – one for clients with 4.* php on servers, and one for 5.*. There are two options here: (first) To upgrade to php5, and write the code to be backward compatible (with php4)? And then, at some point in the future switch to php5… Or to upgrade to php5 and write php5 code?

  3. Kathy Reid says:

    One of the key issues here is coding standards – there are a number of php.ini configurations that are turned off by default in PHP 5 – and are recommended to be kept off for security reasons (such as register_globals). If your PHP 4 codebase heavily utilises these functions, it may require a lot of effort to upgrade to PHP 5.

    There’s a lot to be said for using a business case approach – by asking the questions:

    – What are the benefits of PHP 5?
    – Will the effort in upgrading to PHP 5 provide a return? For instance, you may have an application in PHP 4 (or even 3) which is going to be at end of lifecycle in under two years. Is it worth upgrading?

    If you do choose to upgrade to PHP 5, some good planning now will help to pave the way for PHP 6 and beyond;

    – What coding standards will your code adhere to? If you avoid deprecated, or suggested-to-be-deprecated syntax then you will be in a better position to upgrade.

    – What frameworks are you using (ie CakePHP, Smarty etc)? Are they upgradeable to PHP 5 and do they look likely to be developed in the future?

  4. adnan says:

    I need to upgrade php 4.2.x to 5.2.x running in windows 2003 server using iis as webserver are there any best practise?

    Thank you,
    Adnan

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>