2 posts tagged “php4”
After more than two years of development we're proud to announce the
first stable version of RoundCube Webmail. It's not as feature rich as
we'd like it to be but the released version is considered to run
stable for a productive environment. Thanks to our users we fixed many
bugs and added some nice new features since the first 0.1-alpha
version was published in 2005. So go ahead and upgrade your
installations now! Download the latest release from
http://roundcube.net/downloadsA more or less complete list of changes is available at
http://trac.roundcube.net/wiki/Changelog
(...)
Quoted from Thomas Brüderli's email this morning.
Rejoice. Celebrate. But also let's move on and keep up the great work. :-)
Thanks again to everyone involved!
Edit: We are on digg. (Please digg!)
After bumping up the PHP 5.2.x on one of our servers Friday night, I got reports from some of our clients that certain websites would not work anymore. After investigating this problem, I found that most all of the my problems were in Joomla, Mambo and Drupal plugins/extensions which those people used.
Of course no offense to those three systems (and their developers and people using them ;-)), but I googled the error and found that many people reported similar issues on support forums of those three. At least the top results suggest that. On the list of offenders are also shops such as the very popular OSCommerce. Anyway - just let me stress this again - no offense meant (but you need to fix your code :-P).
On to the fix.
The offending code, could look like (this example is from Mambo's AKO_Book extension):
Digging into this, you will probably find a class that would look similar to this:MENU_Default::MENU_Default();
At first I (paniced and) thought that effectively all static calls without a "static" keyword are broken in PHP5.2.5. But after investigating and raising a bit of havoc on IRC and internals@ (Sorry!), Bjori shed some light into/onto my confusion and figured out that this is just a static call to the constructor of a class.<?php
class MENU_Default {
function MENU_Default() {
// do something
}
}
?>
And calling the constructor of a class directly is just wrong. And static calls to the constructor have not been allowed since 5.0.0. (I am not sure why no one reported issues before but I guess since I wrote our customers that the update was smooth, they just had to dig up something. :-))
The fix is simple and should have been there to begin with:
// currently:
MENU_Default::MENU_Default();// replace with:
new MENU_Default();
Issues like that are to be traced back to PHP4's more 'lax interpretation of OO. Even on PHP4 coders should have written the latter, but no one forced them to. And because I know the pain of upgrading a system like Joomla/Mambo, Drupal and others - especially once you put a lot of customization in it, I hope this helps someone out there fix their issues.
Debatable is still if any version of PHP5 should really consider this to be a fatal error. Or if this call should be subject to E_STRICT which was introduced in PHP5 to ensure forward compatibility of code, which sounds like the best fit for this. I believe in the E_STRICT way.
I know and understand that there are probably about a dozen technical reasons to E_FATAL instead, but in my (very) humble opinion to make people aware with E_STRICT and to add a note that E_STRICT will eventually turn into E_FATAL in PHP6 would have been the right path to persue here.
Less breakage and more awareness - they make the "we told you so"-argument more valid. Everything but that just adds to the user's general fear to adopt PHP5 and to finally get rid off PHP4.
On a side note - I feel that I need to add that we only allow those old versions to run because we patched them for our clients and because we use an application firewall called mod_security. mod_security is customizable through rule sets and we constantly update them to combat known attacks (e.g. XSS, comment spam, ...).
If you don't have those resources available to yourself, you need to consider an update of the PHP application more sooner than later.