Migration to PHP5
This month we finally finished migrating our servers to PHP5. Migrating to php5 was a big thing for us, since it isn't completely backwards compatible. After a lot of research on the running PHP4 code and a lot of testing we had a list of problems for each account to fix. The most common problem we experienced was based on the use of DOM XML, this extension is no longer supported under PHP5. Unfortunately we had a lot of code using this so we had to solve it without reprogramming all these parts. Lucky enough, Alexandre Alapetite wrote a fix for this, which made it actually work under PHP5 without any code changes. The only thing we needed to do was including his class when functionality of DOM XML was needed.
Beside this there where only little account specific problems which are not worth naming here.
After we finally tested all the accounts and made clear what problems to expect and how to fix these, we could start the real migration. We planned to do this at night during some weekends, so the inconvenience would be minimal. Beside of only upgrading to PHP5, we also installed suPHP for supporting PHP4 in CGI mode. We configured this in a way so we can change to PHP4 on the fly on an account base, so other accounts won't change and keep running under PHP5. I would advise this to anybody who needs to migrate. It's a good fallback solution in case of any problems.
Thanks to the good preparation the downtime was minimal and we didn't faced any unexpected issues!
The whole reason of this migration is off course PHP4's end of life. Since the developers of PHP stopped supporting PHP4 from 2007-12-31 almost 3.5 years after the first release of PHP5.
Personally I think it is good to move on and I understand from a developer point of view that they don't want to support out-dated software anymore. But when you look at the current PHP usage statistics you'll see still 73% of PHP installations are using version 4! They need to take conclusions out of this! The world isn't ready for PHP4's end of life! Still so many applications are depending on this version!

Discussion Area - Leave a Comment