Fix osCommerce 2.3.x to be compatible with PHP 5.4.x UPDATED

To make your version of osCommerce 2.3.1 or 2.3.2 compatible with upgrading to PHP 5.4.x you only need to replace 2 files.  The reason why those versions of osCommerce die with the upgrade to PHP 5.4.x is because of the new session handling process in PHP 5.4, you can read about it here: http://php.net/manual/en/migration54.php.  Please note that this fix does not account for any plugins or custom code that you might have.  If you have customized your site there may be other files you will need to update.

To fix:

  • start by downloading the new osCommerce 2.3.3 (this version is compatible with 5.4) here: http://www.oscommerce.com/Products
  • replace your current  /store/includes/application_top.php with the analogous file from the 2.3.3 distribution you downloaded
  • replace your current  /store/includes/functions/sessions.php with the analogous file from the 2.3.3 distribution you downloaded
  • replace your current  /store/includes/functions/whos_online.php with the analogous file from the 2.3.3 distribution you downloaded
  • replace your current  /store/admin/includes/functions/sessions.php with the analogous file from the 2.3.3 distribution you downloaded.

Although we would like to take credit for discovering this fix, but it really belongs to the osCommerce team: http://forums.oscommerce.com/topic/379879-php-54-what-impact-will-it-have-on-osc-v2x/

1 Comment

  1. John Reader

    Thanks for the post resolved issue with oscommerce and php version.

Leave a Reply

Your email address will not be published. Required fields are marked *