Tag: Bugs
PHP 5.3.1 update problems
by Klas Lundberg on Jan.26, 2010, under CMS
One.com just upgraded their systems to PHP version 5.3.1 from 5.2.1. I think it’s great that they keep their systems updated, but it would be really nice if the could inform about these updates somewhere. On the other hand, their chat support was proved to be excellent once again, giving me the answers I needed in a couple of minutes or so.
The problem with the update was however with the new introduction of a very old syntax, used in Basic (and Visual Basic) back in the days when MC Hammer ruled the charts and AJAX was a household cleaner liquid or possibly a soccer team. The syntax is the goto command, used like this:
I would not recommend to use this syntax at all, since it mostly only makes things complicated!
1 2 3 4 5 6 7 | <?php goto a; echo 'Foo'; a: echo 'Bar'; ?> |
The above example will output: Bar
However, this little command caused a lot of trouble on Linn’s site, where all the scripts included a function called goto(). The timing for all this misshappening was really bad, since Linn have a big fashion show coming up and I was in London at the time the site went down. The function is used for redirecting the user to other URL:s with some nice informative graphics in between. With the new command introduced, the function now caused a fatal error on every page, meaning the whole site was down. The problem was easily solved, but I really cannot understand why they would want to introduce that command?
PHP.net has put together a guide with more info about migrating from PHP 5.2.x to PHP 5.3.x.

