Post by warisaha » Fri Nov 24, 2017 1:59 pm

Hello everyone!

I'm using opencart 2.0.3.1 at www.deccan-dental.com and i'm also using wordpress site on the same server with a different directory @ www.deccan-dental.com/newsite.
My problem is i'm getting 500 internal server error after installing a plugin in wordpress site and it is giving me the notice of PHP version update. I would like to ask you that If I update the PHP version from 5.3+ to latest then is there any chance to get my opencart site crashed? Please some one help answering this question. Thanks in advance

New member

Posts

Joined
Tue Sep 19, 2017 2:31 pm

Post by kestas » Fri Nov 24, 2017 7:41 pm

Hi,
Your shop use custom theme and some custom extensions, so you should ask all developers regarding this. Does their extensions support latest php version...

Cheers

Custom OpenCart modules and solutions. Just PM me... Extensions you can find here and here


Active Member
Online

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by warisaha » Wed Dec 06, 2017 3:42 pm

I contacted all the extension developers and they told that their extensions work as long the Opencart works on the desired PHP version and some one also told that Opencart is safe upto PHP 7.0 and will not compatible with 7.2.

Can anyone suggest me how easily and safely update my PHP version to the latest without being damaged to my website

Thanks in advance

New member

Posts

Joined
Tue Sep 19, 2017 2:31 pm

Post by IP_CAM » Thu Dec 07, 2017 3:38 am

Well, OpenCart v.1.5.6.4 works up to PHP v.7.0.27 (post updated!) as tested, but no longer
with v.7.1+, and OC v.2 + works at least up to PHP v.7.1.x. Versions, as they come by default!
Ernie
---
Image

Attachments

php_version_info_1565.jpg

php_version_info_1565.jpg (67.34 KiB) Viewed 2133 times

Last edited by IP_CAM on Thu Mar 15, 2018 1:03 pm, edited 1 time in total.

Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/ - http://www.velomech.ch/cart/
Image


User avatar
Guru Member

Posts

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

Post by windows95 » Sat Jan 13, 2018 8:16 am

im running an opencart 2.2.0.0 store on PHP version 7.2.1

no issues

Newbie

Posts

Joined
Wed Aug 16, 2017 6:22 am

Post by straightlight » Tue Jan 16, 2018 6:28 am

windows95 wrote:
Sat Jan 13, 2018 8:16 am
im running an opencart 2.2.0.0 store on PHP version 7.2.1

no issues
Thanks for the feedback.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

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

Post by David Rahrer » Thu Mar 15, 2018 12:21 pm

straightlight wrote:
Tue Jan 16, 2018 6:28 am
windows95 wrote:
Sat Jan 13, 2018 8:16 am
im running an opencart 2.2.0.0 store on PHP version 7.2.1

no issues
Thanks for the feedback.
How do you deal with mcrypt being deprecated? I know it has been replaced in the latest version with openssl_encrypt, but I have a store running 2.2.0.0 that has been moved to PHP 7.2.1 and it's having issues with this.

Newbie

Posts

Joined
Sun Oct 23, 2011 1:54 pm

Post by IP_CAM » Thu Mar 15, 2018 1:05 pm

Well, then just change to a lower v.7.x PHP Version, in any decent Environment,
one should be able to select between different PHP Versions available. And if
not, one just has a poor Hoster.
Ernie

Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/ - http://www.velomech.ch/cart/
Image


User avatar
Guru Member

Posts

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

Post by OSWorX » Thu Mar 15, 2018 2:42 pm

As Ernie said: if you cannot change your php-Version, change the hoster!
If that is no change for you - while I cannot imagine why not, you can contact me to get the solution.

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by David Rahrer » Fri Mar 16, 2018 2:12 am

IP_CAM wrote:
Thu Mar 15, 2018 1:05 pm
Well, then just change to a lower v.7.x PHP Version, in any decent Environment,
one should be able to select between different PHP Versions available. And if
not, one just has a poor Hoster.
Ernie
Right, but windows95 said they were running 2.2.0.0 on PHP 7.2.1 as well but with no issues. I was wondering if they had patched the mcrypt issue to make it work.

Newbie

Posts

Joined
Sun Oct 23, 2011 1:54 pm

Post by straightlight » Fri Mar 16, 2018 2:39 am

system/library/encryption.php did had changes over the years without the need of mcrypt.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

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

Post by billynoah » Fri May 04, 2018 2:26 pm

Here's a drop in replacement for system/library/encryption.php that will work on OC1.5.6.4 and PHP7.2. Unlike the current version used in OC3, this will not produce the empty iv warning "Warning: openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended"

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 billynoah on Sat May 05, 2018 1:29 am, edited 1 time in total.

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by IP_CAM » Sat May 05, 2018 1:05 am

@billynoah:
Well, thanks a million for this piece of Code, it solved a potentially fundamental Problem,
since my 1.5.6.x was not able to pass the PHP 7.0.xx Mark, as it comes. But now, everything
changed, and the future looks bright again, encouraging me to a great extend! :D
It's like getting a late Christmas Gift !!!
Ernie
---
Image

Attachments

opencart_1565_with_php_7_2_4.png

opencart_1565_with_php_7_2_4.png (118.31 KiB) Viewed 845 times


Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/ - http://www.velomech.ch/cart/
Image


User avatar
Guru Member

Posts

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

Post by billynoah » Sat May 05, 2018 1:28 am

Glad I could help Ernie. I originally submitted a variation of this as a rewrite for OC2+ due to the empty IV issue that throws a warning on current PHP versions. The rewritten function uses all modern openssl() functions and there is a pull request in here (https://github.com/opencart/opencart/pull/6326) to have it integrated into the main repository. If you feel it's an improvement, please drop a comment there so we can get this merged.

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by IP_CAM » Mon May 07, 2018 8:02 am

Well, I will, since it shows a seemengly widely existing Error on PHP 7.2.x !
Ernie ;)
https://wiki.php.net/rfc/counting_non_countables

Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/ - http://www.velomech.ch/cart/
Image


User avatar
Guru Member

Posts

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

Users browsing this forum: No registered users and 14 guests