Post by zollgut » Sun Jun 07, 2020 7:21 pm

Hi, I am having some issues with my website running on 1.5.6 which seem to be tied into the vqMod and have seem to come about in the past few weeks after the website was upgraded to PHP7.3

I'm pasting in the error below, is anybody able to help point me in the right direction how to fix the errors please? I've searched google and the forum but have not managed to find a solution.. Thanks in advance!

--------------------------

Code: Select all

PHP Fatal error:  Uncaught Error: Call to a member function getFile() on bool in /home/site/public_html/vqmod/vqcache/vq2-system_engine_front.php:34
Stack trace:
#0 /home/site/public_html/vqmod/vqcache/vq2-system_engine_front.php(29): Front->execute(true)
#1 /home/site/public_html/index.php(247): Front->dispatch(true, Object(Action))
#2 {main}
  thrown in /home/site/public_html/vqmod/vqcache/vq2-system_engine_front.php on line 34
Last edited by straightlight on Sun Jun 07, 2020 9:44 pm, edited 1 time in total.
Reason: Added code tags.

New member

Posts

Joined
Sat Sep 26, 2009 3:00 am

Post by johnp » Sun Jun 07, 2020 8:25 pm

Which version of VQMOD are you running? Which theme are you using? Did you replace the library/encryption.php file with one for PHP7?

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by zollgut » Sun Jun 07, 2020 9:47 pm

Hi Johnp thanks for the reply.

I've updated to vqMod 2.6.4 after the PHP upgrade.

Theme is a copy of the default one but has been heavily modified since, but it seems it did not have the current issue before the upgrade..

Yes system/library/encryption.php file was also replaced with the newer version, I'm copying in the content of the file below:

Thanks!

-----------------------

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);
	}
}

?>
Last edited by straightlight on Sun Jun 07, 2020 9:48 pm, edited 1 time in total.
Reason: Please use the code tags!

New member

Posts

Joined
Sat Sep 26, 2009 3:00 am

Post by straightlight » Sun Jun 07, 2020 9:50 pm

This issue originates from an installed extension. It is not specifically related to Encryption issues.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 65 guests