tags:

views:

378

answers:

5

We're currently running with php 5.2.5. We have now encountered a bug that creates a seg fault. Our first idea at the solution is upgrading to version 5.2.6 but are skeptical of problems that it will create. We are running Apache and host a dozen or so sites.

  • Will any existing code break?
  • Are there any significant changes to be aware of. I was reading the change log but didn't notice any.
  • Is it easy to revert back to 5.2.5 if something goes wrong?
  • Anything else to be aware of?
+8  A: 

It's impossible for any of us to say definitely yes or no about your existing code breaking without performing an analysis on it first.

This is exactly what test environments are for. If you have a test environment set up, you can perform the upgrade, then do regression testing to see if anything breaks. Without this environment, you're making a gamble.

@Grant Wagner: Great point on virtualization. Setting up a good test environment doesn't have to be difficult.

Kilhoffer
+5  A: 

With modern Virtual Machine options VMware Server, Microsft Virtual Server, Microsoft Virtual PC and others, why not set up a virtual environment running your existing platform, then upgrade and test that?

If you are willing to spend money, you can buy tools to do P2V (Physical-to-Virtual) that will take your existing setup and provide you with a virtualized copy of it (this could be valuable if you've done a lot of customization to the configuration that might be difficult to produce to a virtualized version that matches the original well enough to do proper testing).

Grant Wagner
Couldnt agree more
Kilhoffer
+2  A: 

Most likely not. The jump from 5.2.5 to 5.2.6 is small, it is a bug-fix release (see the changelog).

But whenever upgrading anything, make sure to test your code in a dev environment before putting it into production.

Christopher Nadeau
+1  A: 

As everyone is saying, only testing will tell you for sure. However, minor version updates like this will only rarely cause compatibility problems.

For what it's worth, here are the change notes.

In the long run though, you will have to upgrade at some point or risk being exposed to known security vulnerabilities.

Neall
A: 

Thanks for everyone's input. Getting a test server is definitely on the road map. This should be a good argument for finally getting one setup. We're a small enough company where we could easily get away with only having one, but there are so many advantages to having a test server.

Unfortunately it will be hard to get this project moving forward without upgrading and i doubt there will be time for a test environment.

SeanDowney