| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store | |||
|
|
Thread Tools |
#1
|
|||||||
|
|||||||
PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
Hi guys,
In December, PHP 5.6 and 7.0 have been officially discontinued. If you are still using a server that runs on either of these versions, please take a close look at the blog post. There we're explaining how it may affect your store and offer a few solutions. With any questions, please contact us in HelpDesk or right here.
__________________
Nastya Zhavoronkova, X-Cart |
|||||||
#2
|
|||||||
|
|||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
i'm on 7.1 on my sites. The fast lane checkout doesnt seem to be 7.2 compatible. I get a blank page if I switch to 7.2 and checkout.
__________________
4.7.x xcart store Business 5.4xx |
|||||||
#3
|
|||||||
|
|||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
Hello, I got the PHP 7.0 compatibility patch .
Where can I find the PHP 7.1-7.3 patch that need to be applied right after. , as per your instructions from your blog post. Thank you
__________________
iry xcart gold - 4.6.1) Stylehippo.com Big Scoots Hosting |
|||||||
#4
|
|||||||
|
|||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
Hello,
Quote:
Do you have any fatal errors in var/log/x-errors_php-<date>.php files? Quote:
For X-Cart versions 4.7.9 4.7.8 4.7.7 4.7.6 4.7.5 4.7.4 4.7.3 4.7.2 4.7.1 4.7.0 4.6.6 4.5.5 4.4.5 you can find it in your HelpDesk account > X-Cart > X-Cart supporting files for prev versions -> {Your X-Cart branch} > {Your X-Cart version} > Updates and patches. An adaptation may be is needed for the other versions. Thank you.
__________________
Sincerely yours, Ildar Amankulov Head of Maintenance group |
|||||||
#5
|
|||||||
|
|||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
sorry, its our busy time so i cannot stop and test it.
__________________
4.7.x xcart store Business 5.4xx |
|||||||
#6
|
|||||||||
|
|||||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
We are helping quite a few people either patch or upgrade to switch to php 7. So far it's fairly smooth but the patches are quite large. Sometimes upgrading to the latest 4.7.x is the best option.
Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
|
#7
|
|||||||||
|
|||||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
Keep in mind the patches are not complete and do not fully address all issues older XC versions will have with PHP 7.2+
One example is the use of each() - this has been removed in XC 4.7.9 and later but every version before that has it. And the patches do not address this. each() has been deprecated since PHP 7.2 and most likely will be removed with 7.4 or whatever version they decide on. Cart still works but logs will be full of warnings and XC 4.7.9+ and the patches are not consistent in what they fix. As PHP puts it: This function has been DEPRECATED as of PHP 7.2.0. Relying on this function is highly discouraged. There are other warnings and notices as well that will show after the patches but not with newest XC4 version. So to me the patches are incomplete. And while looking at this (the below code is from 4.7.10) it just doesn't make sense PHP Code:
The "if" will run if meta_description OR keta_meywords are empty but then the following "foreach" breaks only if meta_description AND meta_keywords are not empty?! The code will never get to the "foreach" if both are not empty in the first place.... The second "if" is absolutely unnecessary.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#8
|
|||||||
|
|||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
Quote:
Hello, Thank you for the notes. The code above works as the http://php.net/manual/en/control-structures.do.while.php construction i.e. the first iteration runs anyway. It is a replacement for the deprecated PHP each call Code:
The whole code looks like PHP Code:
The foreach tries to go through the $ids array in order to fill the empty meta_description/meta_keywords of the category from the filled fields of its parents. As for the deprecated warnings, I tried to make minimal patches so as to achieve the maximal compatibility with the client's code. Thank you.
__________________
Sincerely yours, Ildar Amankulov Head of Maintenance group |
|||||||
#9
|
|||||||||
|
|||||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
No. Look carefully the code I posted. It is not that is wrong - it is simply unneeded and will never run the way it is coded. After the
PHP Code:
the code checks if descr AND keywords are NOT empty but this "foreach" will never be reached if both are not empty in the first place. The "foreach" is included in an "if" statement which checks descr OR keywords being EMPTY. If one of them is empty then the "foreach" will run but in this case the following "if" will not run - one of them is empty... You replaced the "each" function and added PHP Code:
without taking into account the parent "if" block. This second "if" will never run and it shouldn't be there.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#10
|
|||||||
|
|||||||
Re: PHP 5.6 and 7.0 Discontinued: How It Affects Your X-Cart 4 Store
Hello Steve,
You are right, it is safe to remove the block PHP Code:
Although I would like to keep the block for the perfomance purpose. By the way, I have posted a small PHP test for the function http://codepad.org/ZVvrVbHa PHP Code:
Thank you.
__________________
Sincerely yours, Ildar Amankulov Head of Maintenance group |
|||||||
|
|||
X-Cart forums © 2001-2020
|