| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12) | ||||
|
|
Thread Tools |
#1
|
|||||||||
|
|||||||||
PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Hi folks.
More and more hosting providers tend to upgrade PHP to v 5.4. At the same time, there are some stores powered by X-Cart v.4.0.x; 4.1.x, which are not compatible with it out of the box. The maintenance team has developed the PHP 5.4 compatibility patch for them. WHAT ABOUT OTHER VERSIONS: 4.2.0 - 4.2.2 do NOT require this patch if older '4.5.3-compatibility patch' is installed ( it makes your store PHP 5.4 compatible too). 4.2.3 or higher is PHP 5.4 compatible out of the box. APPLY THESE FIRST: Before you apply this patch, you should make sure that the corresponding '4.5.3-compatibility patch' is already installed: for 4.0.19: php5.3.x-patch-2010-06-15_4.0.19.tgz for 4.1.12: php5.3.x-patch-2010-04-12_4.1.12.tgz AFTER THE PATCH IS APPLIED: Make sure $debug_mode is NOT set to 3 in config.php WHERE TO FIND THE PATCHES Download the patch (the 'patch-name-{date}_{version}.tgz' archive file) from the 'File area' section of your Qualiteam account. You can find the patch at X-Cart -> X-Cart supporting files for prev versions -> {Your X-Cart branch} -> {Your X-Cart version} -> Updates and patches IMPORTANT UPDATE based on post #11 of this thread: Versions 4.1.9 and older require an additional patch (register_long_arrays_for_xc_lt_4.1.10.ver2.diff ) This patch is provided as is, upon request, without testing, as these X-Cart versions are out of guarantee.
__________________
X-Cart team Last edited by Ksenia : 01-08-2014 at 03:16 AM. |
|||||||||
#2
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Excellent. Our hosting provider has just updated to 5.4 and our store went down. They've reverted us back to 5.2 but are phasing it out by EOM (supposedly). Thank you for creating a patch!
|
|||||||
#3
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
I'm looking at applying the php 5.3 patches to our 4.1.10 x-cart.
All seems like it's going to work except: func.compat.php not found - but I saw the work around for that in another thread. init.php - could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually, I compare the script for both versions and it seems the only difference I can find is to add: x_load('db','files', 'compat'); func_set_memory_limit("16M"); # # Aloow displaying content in functions, registered in register_shutdown_function() # $zlib_oc = ini_get("zlib.output_compression"); if (!empty($zlib_oc) || func_version_compare(phpversion(), "4.0.6") <= 0) define("NO_RSFUNCTION", true); unset($zlib_oc); if (func_version_compare(phpversion(), "5.3.0") >= 0) { define('X_PHP530_COMPAT', true); } if (function_exists('date_default_timezone_get') && function_exists('date_default_timezone_set')) @date_default_timezone_set(@date_default_timezone_ get()); if (!@is_readable($xcart_dir."/config.php")) { echo "Can't read config!"; exit; } Before I go ahead and screw it up, can you confirm that's all I need to do? |
|||||||
|
#4
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Nevermind, I did it anyway and it worked. Now running PHP5.3 which should keep us going for a little while longer.
|
|||||||
#5
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Just a heads up on the patches, cart code and php warning messages. I do not see this with 4.6.x but I see it on 4.5.x and earlier version
PHP 5.4.x will throw out a warning message on some of the XC stock code. Just an example from 4.4.x but I suspect earlier versions is even worst Quote:
The code there is Code:
and the warning is caused by the fact that most likely $cart_item['variantid'] has no value or its value is not numeric From PHP docs - http://docs.php.net/manual/da/language.types.array.php Quote:
This happens on like dozen places in stock XC code from what I've seen. It won't prevent cart from working but makes the patches incomplete
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#6
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Hi Steve,
Thank you for letting us know. We have reuploaded these patches: php5.3.x-patch-2010-04-12_4.1.12.tgz php5.3.x-patch-2010-04-12_4.2.0.tgz php5.3.x-patch-2010-04-12_4.2.1.tgz php5.3.x-patch-2010-04-12_4.2.2.tgz php5.3.x-patch-2010-06-15_4.0.19.tgz We have implemented the workaround, the changes are in init.php - $x_error_reporting = $x_error_reporting & !(E_DEPRECATED | E_USER_DEPRECATED); + $x_error_reporting = $x_error_reporting & ~(E_DEPRECATED | E_USER_DEPRECATED); After applying the patch, if $debug_mode = 2, PHP notices will be recorded into the logs, but not displayed. To completely fix these warnings/notices, a very large patch ( 60-80 commitments) is required, so because of large scope of work the team of architects decided not to dig into it further, as the problem is not critical. We're concentrating on the current branch instead.
__________________
X-Cart team |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Thanks Ksenia, this post was more of to bring QT's attention to the issue so you guys can fix it and have proper code in 4.6.x. The error reporting is not a fix, it just hides the problem from front end
Anyway since these are not critical but just warnings I guess this works sort of
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#8
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Quote:
Does this work for X-Cart 4.1.9? I've been trying to look for patch in folder version 4.1.9 but I do not see patch file. Can you help with version 4.1.9?
__________________
X-Cart 4.1.9 |
|||||||
#9
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
The patch is under 4.1.12 directory. You will have to apply it manually to 4.1.9
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#10
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Quote:
I used your trick and it solved a few problems, but I still running into these warnings: Code:
__________________
X-Cart 4.1.9 |
|||||||
|
|||
X-Cart forums © 2001-2020
|