Post by exibar » Fri Mar 22, 2019 4:39 am

my hosting provider is shutting down PHP 5.6 and switching all their servers to PHP 7.x... do I have to do anything with my ocart Version 1.5.6 install?

if I do have to upgrade to the ocart 2.x version, is there an easy tutorial that will walk me through the process? I do not want to have to reinstall from scratch, I have too much work in setting it all up already.

thanks!
Mike B

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by johnp » Fri Mar 22, 2019 4:45 am

Ernie's (IP_CAM) the man to ask but try this:

https://www.opencart.com/index.php?rout ... load_id=36

++ Quote OC10 for 10% off your first order ++
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD 2.6.1 lover, user and geek.
Fast and Affordable Service for Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
https://www.asandwhenbusinessservices.co.uk


User avatar
Active Member

Posts

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

Post by exibar » Fri Mar 22, 2019 4:58 am

I'm sorry, what will that extension do? will it modify my current items to work with PHP 7.x?

sorry, I'm confused LOL

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by exibar » Fri Mar 22, 2019 5:06 am

so i just switched my site over to PHP 7.2 and it didn't work at all... switching back to PHP 5.6 makes it work again :-(

if I upgrade to ocart 2.x, will that support PHP 7.2? I guess I should upgrade anyway :-( but damn thing's working fine finally.. I hate to break things or have to re-build my site from scratch

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by IP_CAM » Fri Mar 22, 2019 5:29 am

Well, it all depends on the Extensions, one has installed on v.1.5.6.x,
but in most cases, just replace the system/library/encryption.php
File Code with the one shown below, to at least make v.1.5.6.4 / 1.5.6.5_rc
work quite well ... :D ( on my Test Sites at least )
But Peku's Mod, listed/linked above, possibly does not work with PHP 7.2x !
Ernie
PS: Later OC versions even seem to have more problems, to make this work.

Code: Select all

<?php
final class Encryption {
	public function encrypt($key, $value) {
		// Remove the base64 encoding from our key
		$encryption_key = base64_decode($value);
		
		// Generate an initialization vector		
		$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-gcm'));
		
		// Encrypt the data using AES 256 encryption in GCM mode using our encryption key and initialization vector.
		if (in_array('aes-256-gcm', openssl_get_cipher_methods())) {
		    $tag = base64_encode($iv);
		    
		    $encrypted = openssl_encrypt($key, 'aes-256-gcm', $encryption_key, 0, $iv, $tag);		   
		    
		    // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)		
		    return base64_encode($encrypted . '::' . $iv);
		}
	}
	
	public function decrypt($key, $value) {
	       if (in_array('aes-256-gcm', openssl_get_cipher_methods())) {
		    // Remove the base64 encoding from our key
		    $encryption_key = base64_decode($value);
		
  		    // To decrypt, split the encrypted data from our IV - our unique separator used was "::"
		    list($encrypted_data, $iv) = explode('::', base64_decode($key), 2);
		    
		    $tag = base64_decode($iv);
		    
		    return openssl_decrypt($encrypted_data, 'aes-256-gcm', $encryption_key, 0, $iv, $tag);
	      }
       }
}
?>

I'm rarely still active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'000+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

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

Post by exibar » Fri Mar 22, 2019 12:57 pm

ok, cool, I'll try your code out, that's certainly easy enough ;-) thank you very much!

so are you saying that later versions of ocart won't work easily with PHP 7.2? so like ocart 2.x and ocart 3.x? and that only 1.56 will work at all with PHP 7.2?

sorry for the newbie questions :-( but thank you very much for the help!
Mike B

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by IP_CAM » Fri Mar 22, 2019 8:08 pm

Well, just read the Topics about it, I would not be able to judge,
since I don't use later OC-Versions.
Ernie

I'm rarely still active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'000+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

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

Post by exibar » Sun Mar 24, 2019 10:45 am

dang, I just tried replacing the code, and it did not work... Error 500 when I switch from PHP 5.6 over to PHP 7.2 :-(

any thoughts? I'll keep searching and see what I can find

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by exibar » Sun Mar 24, 2019 10:46 am

I tried the above VMOD code as well... still get error 500 when I switch to PHP 7.2

any thoughts on troubleshooting this?

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by IP_CAM » Sun Mar 24, 2019 11:01 am

An error 500 message is comparable with telling the Doctor,
that it hurts, but that you don't know why, and where ... :D
So, better get down to talk Facts & Figures, if you really expect
someone to find out. Your Site Error Log will tell you, what that
Error 500 means, and if you don't find it, ask your Hoster about.
Ernie

I'm rarely still active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'000+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

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

Post by exibar » Sun Mar 24, 2019 11:07 am

yah, I understand that error 500 is a generic server side error... I'm looking for the error log now... I might not have access to it...

This is just been a real pain in the rump, I don't want to have to rebuild my site from scratch... getting some of the payment modules working properly was extremely painful and time consuming...
It does not appear there is a straight upgrade path to any newer versions of Ocart either... that is also frustrating ;-(

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by exibar » Sun Mar 24, 2019 11:09 am

I'm opening a ticket with Lunarpages.... this is rediculous that I dont' have access to my log files

Mike B

New member

Posts

Joined
Fri Dec 06, 2013 12:50 pm

Post by IP_CAM » Sun Mar 24, 2019 12:16 pm

You selected the basic ME-TOO-ONLINE - Abo, to host your Shop. ::)
But for a simple Dollar more, per month, you would have it ...
>> Starting at $4.95/mo - LPCP or cPanel (Available) <<

I'm rarely still active at the OC Forum. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'000+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

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

Users browsing this forum: No registered users and 30 guests