AAAGH!!!! - More extreme frustration caused by version updates.
Here are some more examples of problems you may face when someone goes and 'upgrades' your server. Im into my
third day of trying to debug code that has been moved onto a new server. Just to be clear - this does
not involve the BCA server, but it could easily do so
1) My PHP code uses HERE docs, and makes other uses of strings that include line endings. The server has, for some reason, changed the default line ending so where I happen to test for line endings, my tests were failing. Admittedly, I should have been using PHP_EOL instead of testing for \r\n but, nevertheless - my code WAS working, and then it WASNT. And that's bad, for a supposed "upgrade".
2) I was using the function htmlentities() to display strings that contained the pound symbol,\xA3. But from PHP 5.4.0, UTF-8 is the default character set, instead of ISO-8859-1. \xA3 is not a valid character in UTF-8 so - rather strangely - PHP returns an empty string instead of something, shall we say, "more helpful". I Now need to say ... htmlentities($string, ENT_COMPAT | ENT_HTML401, 'ISO-8859-1') instead of htmlentities($string);
3) Another really weird one is that PHP5.
whatever does not seem to be responding to the auto_globals_jit flag. I can set it and clear it, and it gets set and cleared; but PHP seems to ignore the setting. This means a lot of code rewrites. OK, so the code
is rather old (2007) and one cannot continue to live in the dark ages, in the face of technological breakthroughs like an upgrade from PHP4 to PHP5, but this does highlight that upgrading code is not a simple business.