I have 1.5.5.1 and now migrating to VPS, i'm outsourcing the transition to the hosting staff, but they say the latest php version that works fine is 5.4.
I would like to have the newset version of course, I haven't done my homework about this stuff but I suppose it would be best to have the newset php version, right? Why wouldn't it work on never versions? Do you have any experience?
Thanks so much
Much love
Sander
None of the OC 1.5.+ versions are compatible with PHP 7.
As you know since you have done your research, there is no PHP 6, so the best PHP version for OC 1.5.+ is PHP 5.6.+.
The reason is that PHP 7 (and PHP 7.1 even more!) has evolved considerably and many key functions have since been deprecated.
To use OC 1.5.5.1 you should stay with PHP 5.6.+ for stability, but my advice is to consider upgrading to a newer version.
Alternatively, check my website (link in signature) if you need a PHP 7.1 compatible version.
OpenCart custom solutions @ https://villagedefrance.net
Hi, i have tested your version on php 7.1, there is a problem with module amazon /system/library/amazon.php and istruction deprecated mcrypt_ line 364 >...villagedefrance wrote: ↑Mon Jan 29, 2018 10:17 pmHi Sander,
None of the OC 1.5.+ versions are compatible with PHP 7.
As you know since you have done your research, there is no PHP 6, so the best PHP version for OC 1.5.+ is PHP 5.6.+.
The reason is that PHP 7 (and PHP 7.1 even more!) has evolved considerably and many key functions have since been deprecated.
To use OC 1.5.5.1 you should stay with PHP 5.6.+ for stability, but my advice is to consider upgrading to a newer version.
Alternatively, check my website (link in signature) if you need a PHP 7.1 compatible version.
Consulenza informatica. Soluzione web su misura. Creazione siti web. Creazione soluzioni eCommerce avanzate opencart, joomla, wordpress. Creazione extension. Ottimizzazione SEO, servizio posizionamento web professionale e garantito.
INFO SITI: https://www.masterwebsite.it
CONTATTO SKYPE: masterwebsite.it
I took a look on your website and this overclocked 1.5 version seems a nice solution, but there is still the question if the extensions would work on this version, what do you think? And also, is upgrading to this overclocked version from 1.5.5.1 easy, and what would it require? Would everything else apart the extensions stay the same, or is there much work and adjustments to be done?
Thanks and much love
Sander
but by use of PHP 7.1, they refuse to further work. Exept for the OC installation Routine, and a
Filemanager Admin Tool, as I found out so far, required to be modified, since PHP 7 does no
longer handle MySql, but only MySqli
https://www.opencart.com/index.php?rout ... n_id=20624
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.
http://php.net/supported-versions.php
I was thinking about migrating to 1.5.6x since Ernie says it works with PHP 7.0, but the same page says 7.0 will also end in December 2018.
So I wonder how much longer after December will it still work, depending on the hosting providers decision to stop using the older versions of PHP. I have a lot of vqmods to get around problems mainly for EU required stuff, mostly for correct calculations and displaying of VAT prices, default shipping costs, and product options, and it would take a lot of effort to try making them work with the newest versions of OC. Or does OC 3.x fix some of these requirements?
the default system/library/encryption.php file with this one, sponsored a short
while ago by a fine Contributor. It even worked with PHP 7.2.x, but I run into a widely
known software (Counting) error message, all related to PHP 7.2.x, somewhere, and did not
bother since, to further check on this PHP matter.
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);
}
}
?>
system/library/encryption.php file as it looks, I so far found no problem, up to PHP 7.1.16
Ernie
Code: Select all
<?php
final class Encryption {
private $key;
public function __construct($key) {
$this->key = hash('sha256', $key, true);
}
public function encrypt($value) {
$php_version = phpversion();
if ($php_version >= '7.1') {
$method = 'AES-128-CBC';
$iv_length = openssl_cipher_iv_length($method); // 16
$iv = openssl_random_pseudo_bytes($iv_length);
$encrypted = openssl_encrypt($value, $method, hash('sha256', $this->key, true), OPENSSL_RAW_DATA, $iv);
} else {
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);
if ($php_version >= '5.6') {
$iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM);
} elseif ($php_version >= '5.3') {
$iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_RANDOM);
} else {
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
}
$encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->key, true), $value, MCRYPT_MODE_CBC, $iv);
}
$encoded = base64_encode($encrypted) . '|' . base64_encode($iv);
return strtr($encoded, '+/=', '-_,');
}
public function decrypt($value) {
$php_version = phpversion();
$value = explode('|', strtr($value, '-_,', '+/=') . '|');
$decoded = base64_decode($value[0]);
$iv = base64_decode($value[1]);
if ($php_version >= '7.1') {
$method = 'AES-128-CBC';
$decrypted = trim(openssl_decrypt($decoded, $method, hash('sha256', $this->key, true), OPENSSL_RAW_DATA, $iv));
} else {
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);
if (strlen($iv) !== $iv_size) {
return false;
}
$decrypted = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->key, true), $decoded, MCRYPT_MODE_CBC, $iv));
}
return $decrypted;
}
}
?>
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.
I am still using Opencart 1.5.6.1 with MariaDB 10.1 and PHP 7.3 and current Vqmod with no custom template and almost any extensions, just switch to MySqli posted by IP_CAM , that work perfektly.
After upgrading to PHP 7.3 everithing work ok but from time to time I am getting this warning:
2019-04-12 21:16:07 - PHP Warning: Unknown: Failed to write session data (memcache). Please verify that the current setting of session.save_path is correct (/apachetmp/sessions) in Unknown on line 0
I doesn't succeed induce this warning by myself just by browsing or admin or eshop or making orders. It seams it caused sometimes by end visitors. Is this hosting problem or it means that memcache does not work properly with PHP 7.3 ?
Thank you a lot. I dont want upgrade since I like the old opencart tmeme design and grayish colors .
https://www.google.com/search?q=memcach ... 8&oe=utf-8
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.
Users browsing this forum: No registered users and 122 guests