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:
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
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);
}
}
?>
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
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
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+
2 Week FREE Trial of our Shared Hosting plans (DIrectAdmin or cPanel) for new customers
2 Week FREE Trial of Astra Firewall and Malware Scanner
Visit our website for full details and to start your trial today - www.evolvewebhost.com
Active Member
Who is online
Users browsing this forum: No registered users and 114 guests