View Single Post
  #17  
Old 01-03-2014, 08:23 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)

Quote:
Originally Posted by exsecror
We're running 4.2.3 with PHP 5.5.7 and haven't encountered any issues. The only thing we had to do was replace some deprecated eregi methods.

That was my understanding as well and yet there is definitely something with XC 4.1.x and PHP 5.4.x.

4.1.8 auth.php

PHP Code:
$cat intval(@$cat);
$page intval(@$page); 

and cart was serving home page only under PHP 5.4.x no matter which category you click on. $cat and $page were always 0. As soon as I changed them to

PHP Code:
$cat intval(@$_GET['cat']);
$page intval(@$_GET['page']); 

they were assigned their proper values and category pages started to show up. Same with $productid in product.php....

So I thought it is the register_globals, reverted everything back and host downgraded to PHP 5.3.x - and no issues.

Although now host is saying register_globals is still OFF yet site works....

So there is definitely something with XC 4.1.x and PHP 5.4.x

The other thing that comes to mind and could be the reason is the "register_long_arrays" - also removed in PHP 5.4.x and required to be ON in older versions of XC
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote