Zen Follower
- Join Date:
- May 2008
- Posts:
- 183
- Plugin Contributions:
- 0
Alterations to files for PHP5.4 Compatability
My hosting company (Terranetworks) have informed me of an upcoming upgrade of PHP to version 5.4
I currently run Zencart 1.5.1 on a WINDOWS Server and have a few mods installed.
TerraNetworks have linked me to these threads to upgrade the Zencart until version 1.5.2 is fully working (Which is compatable apparently).
The issues I have are as follows.
- Is self explanatory so no problem
- Im assuming this is for Linux Servers only, does this mean that I dont have to alter these files?
- Having carried out all the alterations carefully and uploaded I seem to have a problem with the very last file. Includes/templates/template_default/templates/tpl_checkout_shipping_default.php
I have a mod called Bristol Lace which has its own templates folder but this file is not in it so I have altered the one in the template default folder.
However when uploaded the site crashes. (See below)
So my questions is, is there any way of checking if the alterations I have done make my site compatable with PHP5.4 BEFORE TerraNetworks make the switch or do I wait until they have done it to find out if my site has kicked the bucket?
for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
$checked = FALSE; ** - THIS LINE IS NOT IN MY ORIGINAL FILE **
-
if (isset($_SESSION['shipping']['id'])) { ** - THIS LINE (TO BE REMOVED) IS NOT IN MY ORIGINAL FILE **
-
if (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) { **- THIS LINE IS TO BE ADDED** $checked = ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']); } if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
-
This is a Date/Timezone Patch (Seems ok)
https://www.zen-cart.com/showthread.php?208662-date-timezone-patch-for-v1-5-1-1-5-0-1-3-9-on-PHP-5-3-5-4-5-5 -
This seems to be for LINUX Installations (Do I then Ignore this for Windows?)
https://www.zen-cart.com/showthread.php?207435-php-5-4-fatal-error-Allowed-memory-size-of-83886080-bytes-exhausted/page2
- Changing SESSION['shipping'] to an array (Way over my head)
https://www.zen-cart.com/showthread.php?202319-PHP-5-4-warnings-Illegal-string-offset/page2