Zen Cart Logo
Forums / Upgrading to 1.5.x / v1.5.1 and PHP5.5 or 5.6

v1.5.1 and PHP5.5 or 5.6

Locked

Views: 4,973

Results 1 to 20 of 26
This thread is locked. New replies are disabled.
19 Sep 2015, 1:39 PM
#1
lindag avatar

lindag

New Zenner

Join Date:
Sep 2015
Location:
Toronto, Ontario, Canada
Posts:
8
Plugin Contributions:
0

v1.5.1 and PHP5.5 or 5.6

Hello,
I’ve just been put in charge of a site that still uses ZenCart 1.5.1. Apparently it was a fresh install, approx. a year ago.

Our web host has advised that they will be upgrading to PHP5.5 (or PHP5.6, optional) almost immediately.
Can you please tell me if ZenCart 1.5.1 is compatible with php5.5 or 5.6? In the “Version” panel it presently states “PHP Version: 5.4.42 (Zend: 2.4.0)”.

I know I need to upgrade to the newest version of ZenCart asap but I will not be able to do it for a few weeks - will it cause the cart to break if the upgrade to php5.5 or 5.6 happens before I can update the software?

What is the best way to proceed with the 1.5.1 -> 1.5.4 upgrade? Is there a patch I can use, or will I have to go with a fresh install?

I’m sorry if these are stupid questions - I’m a tech-noob.
Thank you for your help!
Linda G.

19 Sep 2015, 4:27 PM
#3
lindag avatar

lindag

New Zenner

Join Date:
Sep 2015
Location:
Toronto, Ontario, Canada
Posts:
8
Plugin Contributions:
0

Re: v1.5.1 and PHP5.5 or 5.6

Oh dear. It really does look like I can't put this off even for a few weeks. :(
Thank you for your reply!
I hope I won't have to pester y'all too much for help as I (try to) do this...
Linda

19 Sep 2015, 4:32 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: v1.5.1 and PHP5.5 or 5.6

What payment/shipping modules are you currently using on the site?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Sep 2015, 4:45 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: v1.5.1 and PHP5.5 or 5.6

I just took at look at the v1.5.1 vs v1.5.2 code, and I think the majority of compatibility problems between PHP 5.3 to PHP 5.6 can be fixed by copying over (merging any customizations you've made to these files, if any) from the v1.5.2-beta files into your 1.5.1 site:

The most critical components (I think, off the top of my head at the moment) are: the mysql-to-mysqli change, timezone change, and changes to the way the SESSION[shipping] stuff is done to accommodate stricter array handling by adding checks about SESSION[shipping][id].
There might be more, but these should cover the major issues, and buy you a bit of time.

/admin/includes/extra_configures/use_catalog_time_zone.php
/admin/includes/functions/database.php
/admin/includes/application_top.php
/admin/products_price_manager.php
/includes/classes/db/mysql/query_factory.php
/includes/classes/class.base.php
/includes/classes/order.php
/includes/classes/payment.php
/includes/classes/query_cache.php
/includes/classes/shipping.php
/includes/extra_configures/set_time_zone.php
/includes/functions/password_funcs.php
/includes/init_includes/init_file_db_names.php
/includes/modules/order_total/ot_shipping.php
/includes/modules/pages/checkout_confirmation/header_php.php
/includes/modules/pages/checkout_payment/header_php.php
/includes/modules/pages/checkout_shipping/header_php.php
/includes/modules/pages/checkout_shipping_address/header_php.php
/includes/modules/pages/download/header_php.php
/includes/modules/payment/linkpoint_api/class.linkpoint_api.php
/includes/modules/checkout_new_address.php
/includes/templates/template_default/templates/tpl_checkout_shipping_default.php
/includes/application_top.php

(maybe) /includes/modules/shipping_estimator.php if you're using it and getting errors from it.

plus the changes shown in these:
https://github.com/zencart/zencart/pull/282/files
https://github.com/zencart/zencart/pull/492/files
https://github.com/zencart/zencart/pull/494/files?w=1

And maybe a couple fixes in your payment/shipping modules, depending which ones you're using:
https://github.com/zencart/zencart/commit/cb83287ada35605e20e06b8fe614555b5a729460

Plus the more recently-posted CURL parameter fixes posted to mitigate against POODLE etc.

The above changes should not affect anything in your database, so there's no need to make any database changes for this "patch".
BUT after the site is once again working on the new PHP version one should do a complete and proper upgrade including database updates via zc_install. http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Sep 2015, 6:56 AM
#6
lindag avatar

lindag

New Zenner

Join Date:
Sep 2015
Location:
Toronto, Ontario, Canada
Posts:
8
Plugin Contributions:
0

Re: v1.5.1 and PHP5.5 or 5.6

Thank you DrByte!
The site currently uses the freeshipping, table and zones shipping modules.
Your list is gold, thank you so much - I will definitely try this approach before I launch into a full-blown upgrade.
Linda

23 Sep 2015, 1:04 AM
#7
tmt1630 avatar

tmt1630

New Zenner

Join Date:
Aug 2012
Posts:
33
Plugin Contributions:
0

Re: v1.5.1 and PHP5.5 or 5.6

Ok...I'm in a similar boat as LindaG, however my boat now has a hole!

Same situation...I have a v1.5.1 site and PHP, Apache and MySQL were upgraded today to 5.5, 2.4 and 5.6 respectively. I was feverishly working the upgrade to v1.5.3 but ran out of time. Sure enough, the site is busted.

So I'm forging onward with the upgrade to v1.5.3. I didn't get a chance to shut down the store....will that be an issue as I upgrade the site? I'm guessing not, but thought I'd check.

Thanks!

23 Sep 2015, 1:20 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: v1.5.1 and PHP5.5 or 5.6

tmt1630:

Ok...I'm in a similar boat as LindaG, however my boat now has a hole!

Same situation...I have a v1.5.1 site and PHP, Apache and MySQL were upgraded today to 5.5, 2.4 and 5.6 respectively. I was feverishly working the upgrade to v1.5.3 but ran out of time. Sure enough, the site is busted.

So I'm forging onward with the upgrade to v1.5.3. I didn't get a chance to shut down the store....will that be an issue as I upgrade the site? I'm guessing not, but thought I'd check.

Thanks!

Are you actively upgrading the live site while in this condition? (ie. taking more than maybe an hour at most to address all of the files identified above?) If so, then may want to use phpmyadmin to place it in maintenance mode to 1) prevent issues with any mismatch of information while the files are updated, and 2) to maintain control of what does get modified in the database. However, it is also possible to put it in maintenance mode by simply performing the database upgrade by uploading zc_install and accessing it to perform the upgrade (and ONLY the database upgrade, do not perform a new install).

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

23 Sep 2015, 2:15 AM
#9
tmt1630 avatar

tmt1630

New Zenner

Join Date:
Aug 2012
Posts:
33
Plugin Contributions:
0

Re: v1.5.1 and PHP5.5 or 5.6

mc12345678:

Are you actively upgrading the live site while in this condition? (ie. taking more than maybe an hour at most to address all of the files identified above?) If so, then may want to use phpmyadmin to place it in maintenance mode to 1) prevent issues with any mismatch of information while the files are updated, and 2) to maintain control of what does get modified in the database. However, it is also possible to put it in maintenance mode by simply performing the database upgrade by uploading zc_install and accessing it to perform the upgrade (and ONLY the database upgrade, do not perform a new install).

Thanks MC!

At this time, no one can access the store, or the admin interface. I am working the file updates on my local machine first...have not touched any of the files on the server yet. But, from I read above....I should do the database upgrade and force the database into maintenance mode. Then I would follow it with the v1.5.2/1.5.3 file updates.

Sound right?

23 Sep 2015, 3:35 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: v1.5.1 and PHP5.5 or 5.6

tmt1630:

Thanks MC!

At this time, no one can access the store, or the admin interface. I am working the file updates on my local machine first...have not touched any of the files on the server yet. But, from I read above....I should do the database upgrade and force the database into maintenance mode. Then I would follow it with the v1.5.2/1.5.3 file updates.

Sound right?

Well, DrByte offered a sort of solution above where it appears that the store could be put/kept online without yet doing the database upgrade. I offered a way to put t in maintenance mode if that is what is desired/needed. Kind of depends on where you are in the process and how you are going to progress forward.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

23 Sep 2015, 4:43 AM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: v1.5.1 and PHP5.5 or 5.6

If I may put it another way. The purpose of your store is to make money. Whatever can be done to allow that to continue uninterupted will allow it to do it's job. I somewhat forgot the list of files he offered which predominantly are/were files that didn't seem to be an issue with accessing the database and therefore could "temporarly" keep things moving forward whle the store would be accessible.

Darnit, it all really depends on how fast things can be done wthout causing significant delay in having the store functional. Since DrByte didn't recommend the database update, it makes me think that it shouldn't yet be run if you are going to use the "partial" fix above.... To that end, I don't have an answer at the moment. I'm sorry.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

23 Sep 2015, 1:52 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: v1.5.1 and PHP5.5 or 5.6

The guidance I gave above does not require any database changes.

After the site is once again working on the new PHP version one should do a complete and proper upgrade including database updates via zc_install.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Jan 2016, 5:49 PM
#13
13moons avatar

13moons

Zen Follower

Join Date:
Nov 2003
Posts:
111
Plugin Contributions:
1

Re: v1.5.1 and PHP5.5 or 5.6

I am looking to use this step to go from 1.5.1 to the latest 1.5.4. However I can't locate the 1.5.2 version. Should I do this with 1.5.3 Hot fix version?

Thanks for any help

22 Jan 2016, 5:58 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: v1.5.1 and PHP5.5 or 5.6

ZC 1.5.2

does appear that it has been removed from the https://zen-cart.com/getit path, but can be downloaded from github at the above link.

The thing is, that the above is only necessary to allow the site to temporarily continue operation under the latest PHP while working on the upgrade to the latest... Otherwise should use the rebuild instead of upgrade guidance.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

22 Jan 2016, 6:18 PM
#15
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: v1.5.1 and PHP5.5 or 5.6

All of this looks and sounds very stressful indeed...upgrading a live shop that is half-working, I don't envy anyone in that situation, good luck to you all, hope it goes smoothly.

This is why, apart from the standard advice of having a copy of your shop running on a local server for development is absolutely essential,
I also continually upgrade this local server to the latest version of php precisely to get the heads-up on these compatibility issues many months if not years before the hosting upgrade, so hopefully I never get the rug pulled out from under me.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

22 Jan 2016, 7:47 PM
#16
13moons avatar

13moons

Zen Follower

Join Date:
Nov 2003
Posts:
111
Plugin Contributions:
1

Re: v1.5.1 and PHP5.5 or 5.6

Stressful indeed. Have yet to come up with a plan that makes much sense.

22 Jan 2016, 9:32 PM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: v1.5.1 and PHP5.5 or 5.6

13moons:

I am looking to use this step to go from 1.5.1 to the latest 1.5.4. However I can't locate the 1.5.2 version. Should I do this with 1.5.3 Hot fix version?

Thanks for any help
Please clarify why you're stopping at 1.5.2 instead of going directly to 1.5.4.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Jan 2016, 9:34 PM
#18
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: v1.5.1 and PHP5.5 or 5.6

13moons:

Stressful indeed. Have yet to come up with a plan that makes much sense.

Dunno, seems pretty straight forward to me. Apply the files recommended on the previous page to put the store back in operation. Once that is done, begin the rebuild to upgrade of the files for ZC 1.5.4 in some location other than the root of your existing store... Continue following the instructions of the following: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

22 Jan 2016, 9:36 PM
#19
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: v1.5.1 and PHP5.5 or 5.6

DrByte:

I just took at look at the v1.5.1 vs v1.5.2 code, and I think the majority of compatibility problems between PHP 5.3 to PHP 5.6 can be fixed by copying over (merging any customizations you've made to these files, if any) from the v1.5.2-beta files into your 1.5.1 site:

The most critical components (I think, off the top of my head at the moment) are: the mysql-to-mysqli change, timezone change, and changes to the way the SESSION[shipping] stuff is done to accommodate stricter array handling by adding checks about SESSION[shipping][id].
There might be more, but these should cover the major issues, and buy you a bit of time.

/admin/includes/extra_configures/use_catalog_time_zone.php
/admin/includes/functions/database.php
/admin/includes/application_top.php
/admin/products_price_manager.php
/includes/classes/db/mysql/query_factory.php
/includes/classes/class.base.php
/includes/classes/order.php
/includes/classes/payment.php
/includes/classes/query_cache.php
/includes/classes/shipping.php
/includes/extra_configures/set_time_zone.php
/includes/functions/password_funcs.php
/includes/init_includes/init_file_db_names.php
/includes/modules/order_total/ot_shipping.php
/includes/modules/pages/checkout_confirmation/header_php.php
/includes/modules/pages/checkout_payment/header_php.php
/includes/modules/pages/checkout_shipping/header_php.php
/includes/modules/pages/checkout_shipping_address/header_php.php
/includes/modules/pages/download/header_php.php
/includes/modules/payment/linkpoint_api/class.linkpoint_api.php
/includes/modules/checkout_new_address.php
/includes/templates/template_default/templates/tpl_checkout_shipping_default.php
/includes/application_top.php

(maybe) /includes/modules/shipping_estimator.php if you're using it and getting errors from it.

plus the changes shown in these:
https://github.com/zencart/zencart/pull/282/files
https://github.com/zencart/zencart/pull/492/files
https://github.com/zencart/zencart/pull/494/files?w=1

And maybe a couple fixes in your payment/shipping modules, depending which ones you're using:
https://github.com/zencart/zencart/commit/cb83287ada35605e20e06b8fe614555b5a729460

Plus the more recently-posted CURL parameter fixes posted to mitigate against POODLE etc.

The above changes should not affect anything in your database, so there's no need to make any database changes for this "patch".
BUT after the site is once again working on the new PHP version one should do a complete and proper upgrade including database updates via zc_install. http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

DrByte:

Please clarify why you're stopping at 1.5.2 instead of going directly to 1.5.4.

Aahhheeemmm.. I believe because of the guidance from the above post that was made at the time that ZC 1.5.4 was already issued and someone was having the same problem... At least as a stepping stone to have an active site, that still needs to be upgraded...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

22 Jan 2016, 9:44 PM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: v1.5.1 and PHP5.5 or 5.6

mc12345678:

Aahhheeemmm.. I believe because of the guidance from the above post that was made at the time that ZC 1.5.4 was already issued and someone was having the same problem... At least as a stepping stone to have an active site, that still needs to be upgraded...
Perhaps, but there was no mention of the actual PHP version. Just that they wanted to stop at 1.5.2. So, in the absence of sufficient information, it's difficult to offer potential alternatives to make things easier.

If it's an issue of needing to run v1.5.4 on an older PHP version, it's worth noting that in the short term you can probably get away with running v1.5.4 on PHP 5.2.9 if you apply all the known fixes listed here: Known Bugs (and fixes) with v1.5.4

But PHP 5.2 is so old I have no access to any servers running it anymore, so I'm hypothesizing based on the fact that v1.5.5 can run on PHP 5.2.10 if really necessary (but it will suffer from the security limitations that exist in PHP 5.2).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.