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. You can write PM with additional questions... Extensions you can find here


Active Member

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.2.7 (post updated!) as tested,
and OC v.2 + should work at least up to PHP v.7.1.x. Versions, as they come by default!
Ernie
---
Image
Last edited by IP_CAM on Mon Jul 16, 2018 4:26 am, edited 3 times in total.

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

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

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

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru 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.

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


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

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


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

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 sicotommo » Fri Jul 06, 2018 11:23 pm

Does any one know how to get OC 2.3.0 working on PHP7.2 where mcrypt has been removed? OC 2.3.0 needs mcrypt, is there a workaround similar to the 1.5.6.4 workaround above?

Thanks

New member

Posts

Joined
Wed Jul 27, 2011 8:55 am

Post by straightlight » Sat Jul 07, 2018 12:23 am

sicotommo wrote:
Fri Jul 06, 2018 11:23 pm
Does any one know how to get OC 2.3.0 working on PHP7.2 where mcrypt has been removed? OC 2.3.0 needs mcrypt, is there a workaround similar to the 1.5.6.4 workaround above?

Thanks
Of course, I have also posted my solution about this sometime ago on the forum and on GitHub: viewtopic.php?f=198&t=204707&p=725370#p725077

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 sicotommo » Tue Jul 10, 2018 12:28 am

Thanks!!

New member

Posts

Joined
Wed Jul 27, 2011 8:55 am

Post by sicotommo » Tue Jul 10, 2018 2:01 am

I installed the script shown above for OC 1.5.6.4 operating on PHP7.2 and still no luck - any suggestions? I also have to do it for OC2.3.0 so will use the appropriate script for that as well.

Thanks for any suggestions

New member

Posts

Joined
Wed Jul 27, 2011 8:55 am

Post by straightlight » Tue Jul 10, 2018 4:07 am

sicotommo wrote:
Tue Jul 10, 2018 2:01 am
I installed the script shown above for OC 1.5.6.4 operating on PHP7.2 and still no luck - any suggestions? I also have to do it for OC2.3.0 so will use the appropriate script for that as well.

Thanks for any suggestions
At this point, I really wouldn't suggest to v1.5x releases for the latest release of PHP … I would rather suggest at least the use of v2.3.0.2 release of OC. Otherwise, OC v3.x releases.

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 22 guests