Post by Steve_Regal » Thu Nov 05, 2020 7:38 pm

Hi,

We have been informed by our server provider (TSOHost) that they are updating their servers on the 4th of December and anything lower than PHP7.1 will no longer be supported.

Using the cPanel multiPHP Manager I have been able to change the PHP from 5.6 to 7.2 on all bar one of my URL subdomains. When I first tried it on PHP7.2 the domain which is a wordpress website works perfectly, but the subdomain which is opencart 2.0.2.0 would not load.

I have set the PHP back to 5.6 and it now has an error : Warning: session_start(): Cannot find save handler 'memcache' - session startup failed in /home/regalautosport/public_html/shop/system/library/session.php on line 12

TSOHost have basically said they do not want to restore from a backup yet as they are not sure why this error has occurred. They have 'hidden' the error so the website can be used by our customers still, but I am unable to login to my admin area and there are no errors showing so I can not troubleshoot anything as I have no idea why it will not login. Obviously hiding the error is not a fix either, and I can not update the PHP as it currently breaks the subdomain.

Any help or thoughts would be greatly appreciated!

Newbie

Posts

Joined
Thu Dec 21, 2017 6:54 pm

Post by ADD Creative » Thu Nov 05, 2020 8:17 pm

You PHP session handler seems to be 'memcache'. I understand that memcache is not compatible and not included in PHP 7.

You will need to configure your PHP sessions to use a different handler. https://www.php.net/manual/en/session.c ... ve-handler

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by IP_CAM » Thu Nov 05, 2020 10:07 pm

You will also have to replace the system/library/encryption.php
File Content with this one, to make your OC Version work with PHP v.7.x:

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

I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
3'780 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 Steve_Regal » Thu Nov 05, 2020 10:34 pm

Thanks, however this did not work, it allowed the site to load which is progress, however the catalogue and admin pages fail to load. Looks like the issue might be deeper routed!

Newbie

Posts

Joined
Thu Dec 21, 2017 6:54 pm

Post by ADD Creative » Thu Nov 05, 2020 11:57 pm

Use phpinfo() to see what your session settings are and how they differ from the default.

https://www.php.net/manual/en/session.configuration.php

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 11 guests