Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Sorry just saw this - yes it should work. I've since changed one line of code - the new version checks iv length in case encrypted string is invalid:
Code: Select all
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) {
$result = NULL;
$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);
if (strlen($iv) == $iv_length) {
$result = openssl_decrypt($value, $this->cipher, $key, OPENSSL_RAW_DATA, $iv);
}
return $result;
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Read my latest post on that thread as to why that version will not work.straightlight wrote: ↑Wed Oct 17, 2018 7:14 amI would rather recommend the use of this version: viewtopic.php?f=198&t=204707&p=725077#p725077
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I'm trying to get my 1.5.6.4 running on PHP 7.2 and it seems that I'm only having this problem right now (after editing encyption.php):
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /(domain_name_deleted)/httpd.www/system/library/dompdf/include/autoload.inc.php on line 83 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /(domain_name_deleted)/httpd.www/system/library/session.php on line 7Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /(domain_name_deleted)/httpd.www/system/library/session.php on line 8Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /(domain_name_deleted)/httpd.www/system/library/session.php on line 9Warning: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent in /(domain_name_deleted)/httpd.www/system/library/session.php on line 11Warning: session_start(): Cannot start session when headers already sent in /(domain_name_deleted)/httpd.www/system/library/session.php on line 12
Any idea what is the problem and how to get it working?
Thank you in advance
Tom
To resolve you could do one of the following.
1. Switch off display error in the OpenCart settings and the display_errors setting of your php.ini. These should be off for a live store anyway. You could also switch off showing Deprecated notices. http://php.net/manual/en/errorfunc.conf ... -reporting
Be warned that a later version of PHP may remove the function completely and therefore stop working.
2. See if the extension author has update the extension to use a later version of the Dompdf PDF generator library.
3. Upgrade the library to a later version yourself or through a developer and fix any compatibility problems.
NOT all v.1.5.6.x Version Extensions will function under PHP-7.2x, and a
typical sample is this (otherways very needy) one, which refuses to further
function, as it comes by default:
Web Filemanager for OpenCart
https://www.opencart.com/index.php?rout ... n_id=20624
---
But I am testing a 1.5.6.5_rc Version, equipped with a steady raising amount of VqMod Extensions,
in addition to a bunch of additional Modules, and not one of them produced any PHP Version -
related Errors. So, it's not really a wide-spread problem, but one needs to be aware of it, in
'certain' Module/VqMod - Cases at least, possibly also with the PDF Add-On you use.
Ernie
PS: But I would probably NOT use an OC this way, but rather implement the whole works,
exept for VqModded ON/OFF Switches, into a 'final' Source, to so have everything built-in
by Default. It would make it mucho easier, to then add another range of VqMods,
without the need, to check, which one of the existing VqMods might include something,
keeping a new one from doing it's job. Just to have this mentioned too !
On the other hand, for testing purposes, VqMod is just a great thing to have. But it's
getting quite hard, after a while, to keep track of everything ...
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.
Has anyone running it yet, is there any changes that needs to be made? I have read some threads about mcrypt but not for version 2.2.0.0?
My wordpress installs have niggled me to upgrade to PHP 7. I can change it on Cpanel but just wanted to make sure.
Opencart 1.5.6.4 & PHP 7 - PHP 7.2
https://www.opencart.com/index.php?rout ... n_id=34428
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.
found at the OC Extension Section, by Use of PHP v.7.4.13, in my OC v.1.5.6.4 /1.5.6.5
type Installations, and all seem to work with PHP v.7.4.13, in an unsecured HTTP://
Environment so far. But I cannot judge on Security, possibly, one of the Pro's could
share some 'inside-view' on such ...
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.
Users browsing this forum: No registered users and 123 guests