Open Source Network Blog

Be carefull when upgrading to PHP 5.3
Monday, 09 November 2009 10:26
Jisse Reitsma

Jisse Reitsma

Jisse Reitsma is co-founder of Jira ICT, wrote a book on Joomla! Templates, teaches many courses and programs in Joomla!, Magento and Drupal. Authors profile

This summer PHP 5.3 was released, but while the incrementation of the version-number suggests a minor change, it is important to know that in fact it includes some major changes. While PHP 6 is actively developed, it takes time to round up such a major new version. But PHP-developers are eagerly waiting for some of the PHP 6 functionality, so it was decided to implement some of the PHP 6 features in PHP 5.3 anyway.

With PHP 5.3, some functions are outdated ("deprecated") and replaced with other new functions. It also includes new features like "namespaces" (introducing a new PHP-syntax for classes and functions), "late static binding", gotos and NOWDOCs. Ofcourse the performance has been increased and bugs have been fixed, but looking at backwards-compatibility the major changes seem to be the removal of some outdated functions.

Joomla!, Magento and the rest

Older versions of Joomla! will continue to work but have strange behaviour like non-existant inputboxes. The newest version of Joomla! - version 1.5.15 - fixes all problems. However, currently Magento 1.3 does not support this new PHP version.

A lot of PHP-functions are automaticaly triggering "deprecated" errors, but like any error this make Magento stop execution of the current PHP-script and throw an exception (Error Reporting page). While some have already suggested quick-fixes for these problems, the support-pages of Joomla! and Magento are pretty clear on this: PHP 5.3 is not listed so is not supported. Implementing unsupported quick-fixes might be unwanted but even dangerous: One fix suggested removing all error-messages from Magento so Magento keeps on running despite of any error occurring - if something terrible goes wrong in your Magento shop, you won't know about it. Our recommendation is simple: Do not use PHP 5.3 until it is officially supported.

As for other CMS-es: typo3 seems to have been very quick in fixing all PHP 5.3 issues, as they officially support both 5.2 as 5.3. Also Drupal 6 has been quick with releasing a solution - you will need the latest Drupal version, but it works solid.

XAMPP, DirectAdmin and CPanel

The latest version of the popular XAMPP webserver (which allows for easy installation of Apache, MySQL and PHP on Windows, MacOS and Linux) - version 1.7.2 - includes PHP 5.3. If your application does not support PHP 5.3 it's best to downgrade XAMPP to an older version like 1.7.1. Hosting panels like DirectAdmin and CPanel also offer upgrades to PHP 5.3 but still default to 5.2 to be on the safe side.

 

Stay In The Loop

Subscribe now and we'll send you our latest News, Tips & Trics and Tutorials by email.
Jira ICT
Open Source Support Desk

Latest Comments

Canonical URLs and Joomla!
... I am working on a pretty huge page for a cli
Using Eclipse as Joomla! IDE
Codelobster isnt bad... I'm a dotnet developer...
Writing your own Joomla! splitmenu
Great job and it's worked! But, how to change the
Comparing VirtueMart and Magento
Magento is way worse of spaghetti code. Do you rea
Is Joomla! safe?
You can nver make any software full proof, the lat

Follow Us On Twitter

Follow me on twitter
Home Blog Administration Be carefull when upgrading to PHP 5.3