Page 1 of 1

Question about version 2.0.3.1 and php7

Posted: Tue Aug 18, 2020 8:14 pm
by musicweb
Our server is going to be upgraded to php7 soon and was wondering how our heavily modded version 2.0.3.1 of opencart is going to run.
Thanks in advance for any input....

Re: Question about version 2.0.3.1 and php7

Posted: Tue Aug 18, 2020 8:47 pm
by IP_CAM
You'll need to replace the system/library/encryption.php File, to make a basic OC
Software work with PHP 7, and you will sure find out, if everything else on extension still works. :D
Ernie

Most of the PHP-7 encryption.php files will work, regardless of the OC Version used:
https://www.opencart.com/index.php?rout ... earch=php7

Re: Question about version 2.0.3.1 and php7

Posted: Tue Aug 18, 2020 9:25 pm
by musicweb
Thanks....

Re: Question about version 2.0.3.1 and php7

Posted: Tue Aug 18, 2020 10:07 pm
by EvolveWebHosting
musicweb wrote:
Tue Aug 18, 2020 8:14 pm
Our server is going to be upgraded to php7 soon and was wondering how our heavily modded version 2.0.3.1 of opencart is going to run.
Thanks in advance for any input....
Do you have MultiPHP Manager in your control panel? You can switch PHP versions there and test everything. You can do so without taking a backup or worrying about any damage. If the site does not work, change the PHP version back to what it was and go from there to begin updating your software as needed.

Re: Question about version 2.0.3.1 and php7

Posted: Tue Aug 18, 2020 10:59 pm
by musicweb
Yeah, I believe our server admin is going to do something like that. We own the server.

Re: Question about version 2.0.3.1 and php7

Posted: Fri Aug 21, 2020 12:27 am
by EvolveWebHosting
musicweb wrote:
Tue Aug 18, 2020 10:59 pm
Yeah, I believe our server admin is going to do something like that. We own the server.
You should be able to do this ahead of time to test your site and make any changes before it goes permanent.

Re: Question about version 2.0.3.1 and php7

Posted: Tue Oct 06, 2020 4:57 pm
by Colonial
I am Opencart expert. I have read job description. So the extension is working fine with Opencart 2.3.0.2 and PHP5.6?
The only problem is when you switch to php 7?krogerfeedback

Re: Question about version 2.0.3.1 and php7

Posted: Tue Oct 06, 2020 10:06 pm
by EvolveWebHosting
Colonial wrote:
Tue Oct 06, 2020 4:57 pm
I am Opencart expert. I have read job description. So the extension is working fine with Opencart 2.3.0.2 and PHP5.6?
The only problem is when you switch to php 7?
I don't think he's looking to hire someone. This isn't the commercial section of the forum.

Re: Question about version 2.0.3.1 and php7

Posted: Fri Oct 16, 2020 10:46 am
by mikahawkins
Hello,
So we have a problem with an options extension, it's called Option Combinations. The problem is the product pages can't be displayed and the options created by the extension disappear when we switch the site over to php7.We get an error 500 on the product pages and to get the products to display again you have to go to line 63 of [login to view URL] under /system/modification/catalog/model/catalog and change the line from
"$otp_option_data[] = array("
to
"$otp_option_data = array("
After this edit the products display fine, but the options created by the extension aren't being displayed. If I enable display errors it displays the same error over and over where the options should be,"PHP Warning: Illegal string offset 'type' in /usr/www/users/xucozurjmj/system/modification/catalog/view/theme/journal2/template/product/[login to view URL] on line 351"

Regards,
Mika Hawkins

Re: Question about version 2.0.3.1 and php7

Posted: Fri Oct 16, 2020 3:27 pm
by OSWorX
mikahawkins wrote:
Fri Oct 16, 2020 10:46 am
Hello,
So we have a problem with an options extension, it's called Option Combinations. The problem is the product pages can't be displayed and the options created by the extension disappear when we switch the site over to php7.We get an error 500 on the product pages and to get the products to display again you have to go to line 63 of [login to view URL] under /system/modification/catalog/model/catalog and change the line from
"$otp_option_data[] = array("
to
"$otp_option_data = array("
After this edit the products display fine, but the options created by the extension aren't being displayed. If I enable display errors it displays the same error over and over where the options should be,"PHP Warning: Illegal string offset 'type' in /usr/www/users/xucozurjmj/system/modification/catalog/view/theme/journal2/template/product/[login to view URL] on line 351"

Regards,
Mika Hawkins
The problem is the change you did.

Code: Select all

$otp_option_data[] = array(
to

Code: Select all

$otp_option_data = array(
Instead of adding item(s) to an array, you are creating always a (new) array and assign then.
This part should look like (initialize the array first):

Code: Select all

$otp_option_data = array();
or (short notation since php 5.3):

Code: Select all

$otp_option_data = [];
And below it should read like this (adding item(s) to this array):

Code: Select all

$otp_option_data[] = array(
or short notation:

Code: Select all

$otp_option_data[] = [ .. new value .. ];