views:

899

answers:

4

I'm running a couple of sites and are thinking about moving over to using Nginx instead of Apache and as such I need to move to FCGI where the preferred choice right now seem to be PHP-FPM.

I'm simply wondering about what version of PHP to use. My current sites (using Apache and mod_php i.e. plain vanilla LAMP installation) is using 5.2.8 which has been very stable, uptime 100 days and no problems. However the memory consumption of Apache is huge, hence my need to move to Nginx.

So, anyone out there with real production experience of 5.3.0 (prefereably running FastCGI)?

+5  A: 

We've been running PHP 5.3 on our production servers for a couple of months now without any problems at all. The only issue I had with 5.3 was that since it uses a new driver for MySQL (mysqlnd) instead of the libmysqlclient, it apparently no longer reads the defaults for configuration options like the mysql sock from the my.cnf (tested on latest Debian and Ubuntu). I had to edit php.ini and tell PHP where the mysql sock is located, but after that it's been working without issues.

reko_t
Running Debian Lenny myself. Had the same problem. Took a while too, to figure out. Thanks for your answer.
adergaard
+3  A: 

Had no problems with PHP 5.3 at all, it runs as solid as a rock for me. You might find that lots of script packages fail at first with a bunch of errors related to the timezone not being set, or object references being made in an incorrect ways. These are easily fixed and are just the side effects of depreciated behaviours being removed and stricter behaviours being added.

Nathan Kleyn
Thanks for your answer. I've been through the whole date.timezone ordeal and it's now sorted. The rest seems to work OK.
adergaard
+2  A: 

I would say PHP 5.3 is at least as stable as PHP 5.2. Whether that is stable enough depends on your usage scenario. The main difference between 5.3 and 5.2 is that there are a lot of new features in 5.3.

Sjoerd
+1  A: 

We, as the PHP developers, did work really hard on making PHP 5.3 as stable as possible, but as it includes lots of new code especially these parts might have some small issues and we're fixing quite a few bugs with PHP 5.3.1 which will be released soon. Many of these bugs affect only new parts of the code, new features. So old code should run as stable on PHP 5.3 as 5.2 but way faster.

When using the new features you should test your code well - but that's always the case, I guess.

When migrating from 5.2 to 5.3 the stuff that broke is interesting. Most of it should be documented in the PHP manual. Additionally I posted a question How did PHP 5.3 break your application? to find other issues.

johannes
Thanks with this comeback. Really good to know.
adergaard