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

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

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.


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

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.


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

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.


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

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.


User avatar
Legendary Member

Posts

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

Post by gunner86 » Mon Feb 01, 2021 8:53 pm

Hi exibar ,
i have the same problem now .
on front page it works but admin page PHP Eror 500
1- i update my PHP to 7.2 , 7.3 , 7.4 but also the front page gone . then back to PHP 5.6 as you did and then works . but i can not log in to admin panel
2- i used the codes but didnt work agin , then changed the vqmod newer but didnt work again .
what i have to do ? would you please help me about it ?

Active Member

Posts

Joined
Wed Jul 09, 2014 3:43 pm

Post by straightlight » Mon Feb 01, 2021 8:55 pm

gunner86 wrote:
Mon Feb 01, 2021 8:53 pm
Hi exibar ,
i have the same problem now .
on front page it works but admin page PHP Eror 500
1- i update my PHP to 7.2 , 7.3 , 7.4 but also the front page gone . then back to PHP 5.6 as you did and then works . but i can not log in to admin panel
2- i used the codes but didnt work agin , then changed the vqmod newer but didnt work again .
what i have to do ? would you please help me about it ?
Error logs. However, it is suggested to upgrade Opencart to a higher versions - to at least v2.3.0.2 release - due to old versioning platform.

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

Post by johnp » Mon Feb 01, 2021 10:49 pm

I have several 1.5.6.4 sites running on PHP 7.3. I used the new encryption.php file, upgraded vqmod to the latest version and on one site had to amend the admin.php and admin/config.php files to show mysqli as the DB driver. The sites run fine.

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 gunner86 » Tue Feb 02, 2021 6:20 pm

johnp wrote:
Mon Feb 01, 2021 10:49 pm
I have several 1.5.6.4 sites running on PHP 7.3. I used the new encryption.php file, upgraded vqmod to the latest version and on one site had to amend the admin.php and admin/config.php files to show mysqli as the DB driver. The sites run fine.
i did all of these
I have several 1.5.6.4 sites running on PHP 7.3. I used the new encryption.php file, upgraded vqmod to the latest version

i didint
amend admin.php and admin/config.php files to show mysqli as the DB driver
please would you tell me what is it and how can i fix it . thanks

Active Member

Posts

Joined
Wed Jul 09, 2014 3:43 pm

Post by xxvirusxx » Tue Feb 02, 2021 6:53 pm

You have changed ?

Code: Select all

define('DB_DRIVER', 'mysql');
to

Code: Select all

define('DB_DRIVER', 'mysqli');

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by johnp » Wed Feb 17, 2021 9:38 pm

Hi All. FYI I've just upgraded another client's site to run on PHP 7.4. It's running error free and pretty fast. It's bought my client a bit of time to plan a proper upgrade to OC3 which they're pleased about. :)

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 bardossi » Tue Mar 21, 2023 7:21 am

Hello johnp,
I am just upgrading an OC 1.5.6.4 to PHP 7.4 (on localhost at the moment), the frontend running well, but the admin page does not show up, I am having a white screen. Did you encounter with this before changing the PHP version on server?
I had to replace the old 2.6.1 vqmod to a newer one 2.6.4 since I was getting the ...continue 2; to break 2... error message, the admin page disappeared after then. Do you have some recommedation regarding the vqmod version on PHP 7.4? Any help would be appreciated. Thanks in advance.

Newbie

Posts

Joined
Thu May 14, 2015 1:46 am
Who is online

Users browsing this forum: No registered users and 114 guests