Page 1 of 2
will Version 1.5.6 support PHP 7.x?
Posted: Fri Mar 22, 2019 4:39 am
by exibar
my hosting provider is shutting down PHP 5.6 and switching all their servers to PHP 7.x... do I have to do anything with my ocart Version 1.5.6 install?
if I do have to upgrade to the ocart 2.x version, is there an easy tutorial that will walk me through the process? I do not want to have to reinstall from scratch, I have too much work in setting it all up already.
thanks!
Mike B
Re: will Version 1.5.6 support PHP 7.x?
Posted: Fri Mar 22, 2019 4:45 am
by johnp
Re: will Version 1.5.6 support PHP 7.x?
Posted: Fri Mar 22, 2019 4:58 am
by exibar
I'm sorry, what will that extension do? will it modify my current items to work with PHP 7.x?
sorry, I'm confused LOL
Re: will Version 1.5.6 support PHP 7.x?
Posted: Fri Mar 22, 2019 5:06 am
by exibar
so i just switched my site over to PHP 7.2 and it didn't work at all... switching back to PHP 5.6 makes it work again :-(
if I upgrade to ocart 2.x, will that support PHP 7.2? I guess I should upgrade anyway :-( but damn thing's working fine finally.. I hate to break things or have to re-build my site from scratch
Re: will Version 1.5.6 support PHP 7.x?
Posted: Fri Mar 22, 2019 5:29 am
by IP_CAM
Well, it all depends on the Extensions, one has installed on v.1.5.6.x,
but in most cases, just replace the
system/library/encryption.php
File Code with the one shown below, to at least make v.1.5.6.4 / 1.5.6.5_rc
work quite well ...

( on my Test Sites at least )
But Peku's Mod, listed/linked above, possibly does not work with PHP 7.2x !
Ernie
PS: Later OC versions even seem to have more problems, to make this work.
Code: Select all
<?php
final class Encryption {
public function encrypt($key, $value) {
// Remove the base64 encoding from our key
$encryption_key = base64_decode($value);
// Generate an initialization vector
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-gcm'));
// Encrypt the data using AES 256 encryption in GCM mode using our encryption key and initialization vector.
if (in_array('aes-256-gcm', openssl_get_cipher_methods())) {
$tag = base64_encode($iv);
$encrypted = openssl_encrypt($key, 'aes-256-gcm', $encryption_key, 0, $iv, $tag);
// The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)
return base64_encode($encrypted . '::' . $iv);
}
}
public function decrypt($key, $value) {
if (in_array('aes-256-gcm', openssl_get_cipher_methods())) {
// Remove the base64 encoding from our key
$encryption_key = base64_decode($value);
// To decrypt, split the encrypted data from our IV - our unique separator used was "::"
list($encrypted_data, $iv) = explode('::', base64_decode($key), 2);
$tag = base64_decode($iv);
return openssl_decrypt($encrypted_data, 'aes-256-gcm', $encryption_key, 0, $iv, $tag);
}
}
}
?>
Re: will Version 1.5.6 support PHP 7.x?
Posted: Fri Mar 22, 2019 12:57 pm
by exibar
ok, cool, I'll try your code out, that's certainly easy enough ;-) thank you very much!
so are you saying that later versions of ocart won't work easily with PHP 7.2? so like ocart 2.x and ocart 3.x? and that only 1.56 will work at all with PHP 7.2?
sorry for the newbie questions :-( but thank you very much for the help!
Mike B
Re: will Version 1.5.6 support PHP 7.x?
Posted: Fri Mar 22, 2019 8:08 pm
by IP_CAM
Well, just read the Topics about it, I would not be able to judge,
since I don't use later OC-Versions.
Ernie
Re: will Version 1.5.6 support PHP 7.x?
Posted: Sun Mar 24, 2019 10:45 am
by exibar
dang, I just tried replacing the code, and it did not work... Error 500 when I switch from PHP 5.6 over to PHP 7.2 :-(
any thoughts? I'll keep searching and see what I can find
Re: will Version 1.5.6 support PHP 7.x?
Posted: Sun Mar 24, 2019 10:46 am
by exibar
I tried the above VMOD code as well... still get error 500 when I switch to PHP 7.2
any thoughts on troubleshooting this?
Re: will Version 1.5.6 support PHP 7.x?
Posted: Sun Mar 24, 2019 11:01 am
by IP_CAM
An error 500 message is comparable with telling the Doctor,
that it hurts, but that you don't know why, and where ...
So, better get down to talk Facts & Figures, if you really expect
someone to find out. Your Site Error Log will tell you, what that
Error 500 means, and if you don't find it, ask your Hoster about.
Ernie
Re: will Version 1.5.6 support PHP 7.x?
Posted: Sun Mar 24, 2019 11:07 am
by exibar
yah, I understand that error 500 is a generic server side error... I'm looking for the error log now... I might not have access to it...
This is just been a real pain in the rump, I don't want to have to rebuild my site from scratch... getting some of the payment modules working properly was extremely painful and time consuming...
It does not appear there is a straight upgrade path to any newer versions of Ocart either... that is also frustrating ;-(
Re: will Version 1.5.6 support PHP 7.x?
Posted: Sun Mar 24, 2019 11:09 am
by exibar
I'm opening a ticket with Lunarpages.... this is rediculous that I dont' have access to my log files
Mike B
Re: will Version 1.5.6 support PHP 7.x?
Posted: Sun Mar 24, 2019 12:16 pm
by IP_CAM
You selected the basic ME-TOO-ONLINE - Abo, to host your Shop.
But for a simple Dollar more, per month, you would have it ...
>> Starting at $4.95/mo - LPCP or
cPanel (Available) <<
Re: will Version 1.5.6 support PHP 7.x?
Posted: Mon Feb 01, 2021 8:53 pm
by gunner86
Hi exibar ,
i have the same problem now .
on front page it works but admin page PHP Eror 500
1- i update my PHP to 7.2 , 7.3 , 7.4 but also the front page gone . then back to PHP 5.6 as you did and then works . but i can not log in to admin panel
2- i used the codes but didnt work agin , then changed the vqmod newer but didnt work again .
what i have to do ? would you please help me about it ?
Re: will Version 1.5.6 support PHP 7.x?
Posted: Mon Feb 01, 2021 8:55 pm
by straightlight
gunner86 wrote: ↑Mon Feb 01, 2021 8:53 pm
Hi exibar ,
i have the same problem now .
on front page it works but admin page PHP Eror 500
1- i update my PHP to 7.2 , 7.3 , 7.4 but also the front page gone . then back to PHP 5.6 as you did and then works . but i can not log in to admin panel
2- i used the codes but didnt work agin , then changed the vqmod newer but didnt work again .
what i have to do ? would you please help me about it ?
Error logs. However, it is suggested to upgrade Opencart to a higher versions - to at least v2.3.0.2 release - due to old versioning platform.
Re: will Version 1.5.6 support PHP 7.x?
Posted: Mon Feb 01, 2021 10:49 pm
by johnp
I have several 1.5.6.4 sites running on PHP 7.3. I used the new encryption.php file, upgraded vqmod to the latest version and on one site had to amend the admin.php and admin/config.php files to show mysqli as the DB driver. The sites run fine.
Re: will Version 1.5.6 support PHP 7.x?
Posted: Tue Feb 02, 2021 6:20 pm
by gunner86
johnp wrote: ↑Mon Feb 01, 2021 10:49 pm
I have several 1.5.6.4 sites running on PHP 7.3. I used the new encryption.php file, upgraded vqmod to the latest version and on one site had to amend the admin.php and admin/config.php files to show mysqli as the DB driver. The sites run fine.
i did all of these
I have several 1.5.6.4 sites running on PHP 7.3. I used the new encryption.php file, upgraded vqmod to the latest version
i didint
amend admin.php and admin/config.php files to show mysqli as the DB driver
please would you tell me what is it and how can i fix it . thanks
Re: will Version 1.5.6 support PHP 7.x?
Posted: Tue Feb 02, 2021 6:53 pm
by xxvirusxx
Re: will Version 1.5.6 support PHP 7.x?
Posted: Wed Feb 17, 2021 9:38 pm
by johnp
Hi All. FYI I've just upgraded another client's site to run on PHP 7.4. It's running error free and pretty fast. It's bought my client a bit of time to plan a proper upgrade to OC3 which they're pleased about.

Re: will Version 1.5.6 support PHP 7.x?
Posted: Tue Mar 21, 2023 7:21 am
by bardossi
Hello johnp,
I am just upgrading an OC 1.5.6.4 to PHP 7.4 (on localhost at the moment), the frontend running well, but the admin page does not show up, I am having a white screen. Did you encounter with this before changing the PHP version on server?
I had to replace the old 2.6.1 vqmod to a newer one 2.6.4 since I was getting the ...continue 2; to break 2... error message, the admin page disappeared after then. Do you have some recommedation regarding the vqmod version on PHP 7.4? Any help would be appreciated. Thanks in advance.