Page 1 of 1

Domain warning about php upgrade

Posted: Thu Jun 15, 2017 4:41 pm
by SubatWest
I am using Opencart 2.2 on a domain hosting using php 5.4 They have advised that they are upgrading to php 7.xx and are warning me to make changes to my installation. Can anyone advise ho this will affect the site and what should I do?
Thanks for any input.

Re: Domain warning about php upgrade

Posted: Thu Jun 15, 2017 10:15 pm
by imdevlper18
Yes there can be issues shifting to php 7.
Because certain functions are deprecated in latest php version.
And 2.2 version might be using that.
So you may see some errors.

You can keep your store to use lower php version.
Your host can do that for you.

You can add below code in your .htaccess file:

Code: Select all

AddHandler application/x-httpd-php53 .php .php5 .php4 .php3
I have not tested this. But should work.

Re: Domain warning about php upgrade

Posted: Thu Jun 15, 2017 10:29 pm
well, I have not found many, even with my oc V., the only changes (Updates!)
required where for the MySql-Buddy and the eXtplorer File-Editor Extensions,
beeing part of the good old OpenShop Admin Extensions. And the INSTALL
Routine also does not find it's DB anymore, when I tried to install it, the default way,
so, I had to switch back to PHP v.5.6.x temporarely, to make this INSTALL work again.

But it may also depend on Extensions used, the free OC 1.5.6.x File Editor (not image editor!),
offered in the Extension Section, did no longer function with PHP 7, so, any Extension, interacting
with the DB, and possibly not prepared to 'handle' MySqli, would therefore no longer be
able, to work, because PHP7 requires MySqli.

OC2 itself should therefore not have a problem at all, I assume. But it did NOT make any difference
in overall OC-performance, contrary to claims, that it would, just to mention this too! :D

Re: Domain warning about php upgrade

Posted: Fri Jun 16, 2017 1:34 am
by SubatWest
Thanks guys
I have a number of Opencart extensions that rely on my Opencart verson. I suppose it will be a suck and see situation. The Hosting Domain are saying that fall back to earlier PHP will be phased out and are expecting everyone to move to 7.xx Might have to review them and move the site if issues develop.

Re: Domain warning about php upgrade

Posted: Fri Jun 16, 2017 10:11 pm
by MrPhil
Well, it's reasonable to warn clients that eventually PHP 7.0 will be the earliest supported level, but it's somewhat early to actually be requiring it. PHP 5.6 still has some support for another year and a half ( A lot of code is going to break when older versions of PHP are phased out. Of course, site owners should be aware of what versions of PHP their sites will properly run on, and to do the appropriate code upgrades as those versions approach phase-out and removal. But, it shouldn't be panic time for those still on PHP 5. That said, you should be testing for and looking at what's not PHP 7-compatible and making plans to upgrade in an orderly manner, starting with a move to higher levels of PHP 5 (5.6 is the current level). The older your OC version (and the extensions you're using), the more likely something will break when you move to PHP 7. It's good to keep this in mind at all times, keeping your site updated, so that you don't end up having to make a huge jump like 5.2 to 7.0. A series of small steps at frequent intervals is a lot easier than a huge jump every few years.