Biting the bullet and upgrading to PHP5.1 on prince.org
Due to some other work I’ve been doing in PHP5, and wanting to host on the prince.org server, I finally decided to bite the bullet and upgrade the server’s PHP (for the sites). I had been dreading it, because I knew the eAccelerator wouldn’t work properly with the PHP 5.1 code, and I have my misgivings about APC, (even though we use it in production at Yahoo everywhere) but I desperately need the cache. Plus, the legacy “org” code was written in the PHP4.0 days, so you know there’s going to be issues… like all that wonderful “you really can’t return a reference here… now that’s an error, we used to ignore it (and sometimes segfault)” thing.
I did recompile it though and slam it up, along with building the APC (”pear install apc”, whoo hoo… except for the gotcha in the docs, if you can even find them… it’s an “extension” now not a “zend_extension”). I also built in both the mysql and mysqli stuff (old code uses my own large mysql wrapper class, new code uses ADODB with mysqli underneath for cursors, etc.) All went pretty
smoothly, once I hunted down and killed a rogue line in my php.ini.
I did have a couple places where I had to change the return values of functions to not be references, and now I’m getting a lot more undefined variable warnings (my code sets error_reporting(E_ALL), and apparently it’s stricter now), but basically all went pretty well. And so far, I think I actually like APC better than eAccelerator. I definitely like that some of the Yahoo extensions (for loading constants and storing arbitrary values in the cache) are now exposed. Yay Open Source, yay Yahoo.
So far, so good. Only thing left is to get a weird older version of the Pear class NNTP_Realtime working again (it went missing, after the PEAR install on PHP5, oddly). I need this for some of the Usenet interfacing code. But hey, that shouldn’t be too bad. Way to go PHP5!