Post by Aelanna » Tue Aug 04, 2020 12:34 pm

Is there a chart somewhere that shows what version of PHP is required/supported for which version of opencart?

Newbie

Posts

Joined
Tue Aug 04, 2020 12:32 pm

Post by IP_CAM » Tue Aug 04, 2020 5:41 pm

Depending on the OC Version used, it works up to PHP v.7.4.x (as tested so far),
and for older OC Versions, to achieve that, one possibly needs to
use a system/library/encryption.php file like this one:

Code: Select all

<?php
final class Encryption {
	
	private $cipher = 'aes-256-ctr';
	private $digest = 'sha256';
	private $key;
	
	public function __construct($key) {
		$this->key = $key;
	}

	public function encrypt($value) {
		$key       = openssl_digest($this->key, $this->digest, true);
		$iv_length = openssl_cipher_iv_length($this->cipher);
		$iv        = openssl_random_pseudo_bytes($iv_length);
		return base64_encode($iv . openssl_encrypt($value, $this->cipher, $key, OPENSSL_RAW_DATA, $iv));
	}
	
	public function decrypt($value) {
		$key       = openssl_digest($this->key, $this->digest, true);
		$iv_length = openssl_cipher_iv_length($this->cipher);
		$value     = base64_decode($value);
		$iv        = substr($value, 0, $iv_length);
		$value     = substr($value, $iv_length);
		return openssl_decrypt($value, $this->cipher, $key, OPENSSL_RAW_DATA, $iv);
	}
}
?>
In later OC Versions, that php end ?> is no longer required.
Other encryption.php files are available in the OC Extension Section as well.
Usually, nothing else is required, to make PHP v.7.x work on OpenCart.
But a specific List on this does not exist.
Ernie

Please don't send me OC Forum Personal Messages, just contact: jti@jacob.ch
---
OC 1.5.6.5 LIGHT Test Site: http://www.bigmax.ch/shop/
OC 1.5.6.5 V-PRO Test Site: http://www.openshop.li/shop/
My Github OC Site: https://github.com/IP-CAM
2'600+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by EvolveWebHosting » Tue Aug 04, 2020 8:51 pm

Older versions do not have any fixes for vulnerabilities to jquery, bootstrap, etc. It is best to use one of the newer versions and PHP 7.2+

Image
Take a close look at our domain pricing. It's cheaper than most of the 'big name' registrars.
Detailed guide on how to install Opencart


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by Tom Shell » Sat Aug 15, 2020 1:08 am

I am using an old version of PHp and want to check which version of opencart would support it.
How to check the same?

Newbie

Posts

Joined
Fri Jul 03, 2020 8:04 pm
Who is online

Users browsing this forum: No registered users and 8 guests