Thread: v156c to PHP8.2

Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2011
    Location
    Tokyo
    Posts
    25
    Plugin Contributions
    1

    Default v156c to PHP8.2

    Hello!

    My very old server in Debian 10 and back-ported PHP5.6.40 is reaching the end of its life (SSDs dying) and my only upgrade hosting option is Debian 12 with PHP8.2...

    I have a v1.5.6c running fine with good ol' PHP5 but it's time to upgrade... I tried running it straight on PHP8.2 and I can only get a blank screen, somehow the base class fails to load silently.

    So... from your past experience, what would be a possible upgrade path?
    Should I upgrade to ZC 2.0+ directly?
    Should I go through a local PHP7 validation path to upgrade to 1.5.8 first?

    What would make sense?

  2. #2
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    250
    Plugin Contributions
    4

    Default Re: v156c to PHP8.2

    Quote Originally Posted by generikz View Post
    Hello!

    My very old server in Debian 10 and back-ported PHP5.6.40 is reaching the end of its life (SSDs dying) and my only upgrade hosting option is Debian 12 with PHP8.2...

    I have a v1.5.6c running fine with good ol' PHP5 but it's time to upgrade... I tried running it straight on PHP8.2 and I can only get a blank screen, somehow the base class fails to load silently.

    So... from your past experience, what would be a possible upgrade path?
    Should I upgrade to ZC 2.0+ directly?
    Should I go through a local PHP7 validation path to upgrade to 1.5.8 first?

    What would make sense?
    It can depend on what plugins etc you used in 1.5.6, but basically I would install zc2 on your new server, then replace the sample database with your old database and run the install again to upgrade the database and you should then have a vanilla zen cart 2 running with your data.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,281
    Plugin Contributions
    125

    Default Re: v156c to PHP8.2

    @Royaldave is right - a two step upgrade is a waste of time.

    Be sure to review the upgrading docs at

    https://docs.zen-cart.com/user/upgrading/
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Sep 2011
    Location
    Tokyo
    Posts
    25
    Plugin Contributions
    1

    Default Re: v156c to PHP8.2

    Thank you for the feedback.

    Will give the v1.5.6c => 2.0+ update a try and report if about the process (in case I hit/fix a few bumps along the road).

    All in DEV environment so I can break things without entering panic mode.

  5. #5
    Join Date
    Sep 2011
    Location
    Tokyo
    Posts
    25
    Plugin Contributions
    1

    Default Re: v156c to PHP8.2

    Baby steps!

    First steps tonight were to get zc_install to be happy with all PHP8.2 extensions before trying an upgrade.

    Took me a while to remember that CURL and INTL required the PATH to PHP to be set at the system level on Windows 10 (so that Apache can find it) and not at the DOS level (where PHP CLI was not having any issue).

    Database upgrade went smoothly from to 1.5.7 => 1.5.8 => 2.0.

    Then the main page was blank...

    But tracing back where PHP was failing pointed to HEADER_TITLE_CATALOG in includes\init_includes\init_add_crumbs.php

    And then I remembered that my sister's Store is in French!

    After adding French Language Pack for ZC v2+, I finally reached the main page with no error.

    Of course none of the plugins/customization are included back as of yet, but now I know there is a working path to upgrade the database + language when this part will be ready.

    The admin section is also throwing a blank screen, will advance further there to see what modification might have broken it.

  6. #6
    Join Date
    Sep 2011
    Location
    Tokyo
    Posts
    25
    Plugin Contributions
    1

    Default Re: v156c to PHP8.2

    Quote Originally Posted by generikz View Post
    The admin section is also throwing a blank screen, will advance further there to see what modification might have broken it.
    Was only because, although I set SSL to false, the PHP extension=openssl was still required otherwise:

    Code:
    PHP Fatal error:  Uncaught Error: Call to undefined function openssl_random_pseudo_bytes()
    Click image for larger version. 

Name:	ZC201.png 
Views:	212 
Size:	21.6 KB 
ID:	20801

    Very impressed by how easy the base upgrade from v1.5.6c to v2.0.1 is.

    Looking at the dates... it seems that I force myself to perform a full version upgrade/catch-up every 7 years

    Congrats to all the ZC code contributors, you can see how far back this ZC has been upgraded from and it's still working as expected!


  7. #7
    Join Date
    Sep 2011
    Location
    Tokyo
    Posts
    25
    Plugin Contributions
    1

    Default Re: v156c to PHP8.2

    I actually updated the DB all the way to v2.1.0.

    But I have an issue login in with existing Cart.

    Code:
    PHP Fatal error:  Uncaught Error: Undefined constant "SHOW_SHOPPING_CART_COMBINED" in (...)\includes\modules\pages\login\header_php.php:97
    I can see SHOW_SHOPPING_CART_COMBINED is not new since 1.5.6c and was likely a DB configuration entry, maybe it was dropped from the DB when updated?

    Julien

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,841
    Plugin Contributions
    11

    Default Re: v156c to PHP8.2

    Quote Originally Posted by generikz View Post
    I actually updated the DB all the way to v2.1.0.

    But I have an issue login in with existing Cart.

    Code:
    PHP Fatal error:  Uncaught Error: Undefined constant "SHOW_SHOPPING_CART_COMBINED" in (...)\includes\modules\pages\login\header_php.php:97
    I can see SHOW_SHOPPING_CART_COMBINED is not new since 1.5.6c and was likely a DB configuration entry, maybe it was dropped from the DB when updated?

    Julien
    that constant was added in v138.

    you can re-add it using the following sql statement, but i would be suspicious that there are other problems with your database.

    as to, "it was dropped when updated?" i see nothing in the code that would do such a thing.

    Code:
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Show Notice of Combining Shopping Cart on Login', 'SHOW_SHOPPING_CART_COMBINED', '1', 'When a customer logs in and has a previously stored shopping cart, the products are combined with the existing shopping cart.<br /><br />Do you wish to display a Notice to the customer?<br /><br />0= OFF, do not display a notice<br />1= Yes show notice and go to shopping cart<br />2= Yes show notice, but do not go to shopping cart', '9', '35', 'zen_cfg_select_option(array(\'0\', \'1\', \'2\'), ', now());
    that is from here.

    best.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  9. #9
    Join Date
    Sep 2011
    Location
    Tokyo
    Posts
    25
    Plugin Contributions
    1

    Default Re: v156c to PHP8.2

    Quote Originally Posted by carlwhat View Post
    that constant was added in v138.

    you can re-add it using the following sql statement, but i would be suspicious that there are other problems with your database.
    Since I started ZC from 1.3.8 maybe I used an early version that was missing that entry?

    I did add it back manually -- checking that previous and following entries in ZC 2.1.0 SQL install script were present -- and things are working.
    1.5.6c didn't require it at client log on but on 2.1.0 it's required.

    All good now.

    Julien

  10. #10
    Join Date
    Jan 2005
    Posts
    17
    Plugin Contributions
    0

    Default Re: v156c to PHP8.2

    Quote Originally Posted by generikz View Post
    Looking at the dates... it seems that I force myself to perform a full version upgrade/catch-up every 7 years

    Hmm

    Click image for larger version. 

Name:	brave_BqOP7Ileqm.jpg 
Views:	19 
Size:	35.5 KB 
ID:	20946

 

 

Similar Threads

  1. v157 Problems with v157 or possibly newer with PHP8 upgrade
    By GoldBuckle in forum Upgrading to 1.5.x
    Replies: 8
    Last Post: 24 Mar 2022, 10:52 PM
  2. v155 v 1.5.7 and PHP8 Question
    By greg_beyer in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 26 Feb 2021, 02:05 AM
  3. v156 SAGE pay solution for v156c
    By dallison in forum Addon Payment Modules
    Replies: 4
    Last Post: 19 Jan 2020, 11:33 PM
  4. v156 v156c Checkout Confirmation html tags exposed
    By raycruzer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Jan 2020, 05:44 AM
  5. Security Patch for all versions prior to v156c
    By wilt in forum Zen Cart Release Announcements
    Replies: 0
    Last Post: 16 Jul 2019, 10:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR