osCommerce and PHP 5

By | May 6, 2008

Loretta asks;

I hope you can give a piece of advice regarding whether osCommerce v2.2 ms2 will work with PHP 5.2.5? I new to osCommerce and my client’s shop is v2.2 ms2 – live for 4 years. The hosting company will be moving all their servers to this newer version of PHP by December, January 2009 (the latest they say) and will no longer support any PHP 4.x versions. So can ms2 work with PHP 5.2.5 and if so what needs to be done? Should we put off undertaking a major redesign of her existing osC shop till this is figured out?

I’ve been searching the osCommerce forums and can’t seem to find a post directly addressing this question – some only hint that it’s possible, but I need to know for sure. Can you advise and maybe point me in the right direction?  Your help is greatly appreciated!

Ok, osCommerce does work in PHP5 – but it is problematic if you are running an older version such as MS2. You will need to make a lot of code changes in order to keep using it, as I have no doubt that whilst upgrading to PHP5, they will also turn register globals off (which is a good thing) and make other changes such as upgrading MySQL to v5. So you will get lots of errors due to the way that osCommerce is coded – all of which are solvable with a bit of work.

I’ve been updating osCommerce stores to php5/sql5 and it’s a total pain to do it.

More recent versions of osCommerce should work with php5/sql5 without any problems – so my advice to you is to update your clients shop to the latest available version (which at this moment is RC2a). Obvioulsy this means that you will need to migrate your customers database (retaining the products, customer lists, orders etc) and re-install all the contributions she presently has – bear in mind that some contributions which work in MS2 will not work in RC2a.

By the time you do make the upgrade, osCommerce Version 3 might be out (don’t hold your breath though!).

Hope this helps, Gary

2 thoughts on “osCommerce and PHP 5

  1. Loretta

    Thank you Gary, your’e a great resource. Now I can advise my
    client. But I’m also curious why there is not much mention
    of pending “end of life” for PHP 4 in the osC forums?

  2. Gary Post author

    Glad you found it useful Loretta – there are not too many really knowledgable people in the osCommerce forums unfortunately 🙁

Leave a Reply

Your email address will not be published.