This article is for site owners to give some basic information about PHP5.3.
- Who is affected?
- Will my site break?
- Continuing to use PHP5.2
- How can I make my site compatible?
- Quick Fix solutions
Who is affected by PHP5.3?
Any site that runs PHP scripts is affected by which PHP version runs on the server. You can quickly check if your site uses PHP by looking at the file names of your website – if it ends in .php, then your site is PHP driven.
Another way to check is your software. Many popular open source websites such as WordPress, PrestaShop, OpenCart, Magento, Zen Cart, osCommerce, Joomla, Drupal etc are built with PHP.
Will my site break if I don’t upgrade?
It depends but most likely yes.
Zen Cart has a fatal error with date_diff() which will stop the site from displaying.
osCommerce has a check for register_globals and if this is off, it will also stop it from displaying (register_globals is OFF by default in our PHP5.3 version but can be re-enabled).
For other sites, the most likely outcome of your site not working properly with PHP5.3 is deprecation warnings being generated. The warnings are meant to alert site owners that functions used in their website will be removed in future PHP versions. Whether this causes any problems will depend on your software.
Continuing to use PHP5.2
To avoid any problems with older software, TerraNetwork is making a secondary PHP5.2 build available to site owners. This will stay in place until end of March 2012 and provide another 6 months to upgrade sites.
For details please see https://support.terranetwork.net/web/knowledgebase/136/PHP-52-Build-switch-a-site-to-using-PHP-52.html or for help please contact support.
What do I need to do to make my site PHP5.3 compatible?
Best option is always to upgrade your software to the latest version. This will not only keep you compatible with the latest PHP version, but also apply bug fixes and most importantly, security patches to your site.
A list of PHP5.3 compatible software versions is available here: http://www.terranetwork.net/blog/2011/03/php5-3-is-coming/#versions.
Quick Fix
A quick fix is only meant as temporary solution, and should never be seen as a substitute for updating the code properly. Primarily because running out-of-date software is an open invite to any hacker taking an interest in your site.
But if you’re in a tight spot and need to buy extra time until your developer can upgrade the site, then you can simply adjust the error recording on your site to exclude deprecation notices from being recorded.
Zen Cart 1.3.8. and 1.3.7
In Zen Cart, the error recording needs to be adjusted in the two application_top.php files (frontend and admin):
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
NB: Zen Cart also has an error with the function date_diff – this can only be fixed by upgrading the site. For details please see http://www.zen-cart.com/forum/showthread.php?t=140960.
To re-enable register_globals, please contact support for a local php.ini file.
osCommerce MS2.2
In osCommerce, the error recording needs to be adjusted in the two application_top.php files (frontend and admin):
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
For details see http://forums.oscommerce.com/topic/341737-function-ereg-replace-is-deprecated/.
To re-enable register_globals, please contact support for a local php.ini file.
Magento 1.3
In index.php change
error_reporting(E_ALL | E_STRICT);
to
error_reporting(E_ALL & E_STRICT & ~E_DEPRECATED);
Open downloader/Maged/Pear.php and change
error_reporting(E_ALL & ~E_NOTICE);
to
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
Open lib/Varien/Pear.php and change
error_reporting(E_ALL & ~E_NOTICE);
to
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
Source http://www.magentocommerce.com/boards/viewthread/54158/.
WordPress 2.x
In the wp-config.php file add this line:
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
Then in wp-load.php change
if ( defined('E_RECOVERABLE_ERROR') )
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);
else
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING);
to
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
And in the wp-settings.php file change
// Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development.
if (defined('WP_DEBUG') and WP_DEBUG == true) {
error_reporting(E_ALL);
} else {
if ( defined('E_RECOVERABLE_ERROR') )
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);
else
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING);
}
to
// Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development.
if (defined('WP_DEBUG') and WP_DEBUG == true) {
error_reporting(E_ALL);
} else {
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
}
Source: http://wordpress.org/support/topic/php-deprecated-warnings-on-every-screen.
PrestaShop | opencart | Joomla! | Drupal
PrestaShop, opencart, Joomla! and Drupal should honour the default server php.ini setting.





No comments yet.