Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2021
    Location
    South Africa
    Posts
    2
    Plugin Contributions
    0

    Default Cannot change save handler when headers already sent in

    Hi to the Zen Team and to any member that might be able to help.

    I have had a zen-cart on GoDaddy server for two years and has been running like a charm.
    Yesterday we moved it to their VPS offering I was hoping there would not be any issues but, I am getting the dreaded Cannot change save handler when headers already sent in

    [16-Jul-2021 15:00:50 UTC] Request URI: /index.php?main_page=login&action=process&mp=universal, IP address: 41.157.71.81
    #1 session_set_save_handler() called at [/home/qyqesyxtkv7a/public_html/includes/functions/sessions.php:250]
    #2 require(/home/qyqesyxtkv7a/public_html/includes/functions/sessions.php) called at [/home/qyqesyxtkv7a/public_html/includes/init_includes/init_sessions.php:27]
    #3 require(/home/qyqesyxtkv7a/public_html/includes/init_includes/init_sessions.php) called at [/home/qyqesyxtkv7a/public_html/includes/autoload_func.php:52]
    #4 require(/home/qyqesyxtkv7a/public_html/includes/autoload_func.php) called at [/home/qyqesyxtkv7a/public_html/includes/application_top.php:181]
    #5 require(/home/qyqesyxtkv7a/public_html/includes/application_top.php) called at [/home/qyqesyxtkv7a/public_html/index.php:27]
    --> PHP Warning: session_set_save_handler(): Cannot change save handler when headers already sent in /home/qyqesyxtkv7a/public_html/includes/functions/sessions.php on line 250.

    I have reviewed code for normal issues blank space or extra line but cannot find any and cleared any that might be.

    The previous server
    • cPanel Version 86.0 (build 30)

    • Apache Version 2.4.46

    • PHP Version 5.6.40

    • MySQL Version 5.6.51-cll-lve

    New server
    • cPanel Version 96.0 (build 11)

    • Apache Version 2.4.48

    • PHP Version 7.4.21

    • MySQL Version 5.7.34



    Please Zen Masters your help would be much appreciated, I have a lot of upset customers

    Best Regards and many thanks.
    Stay Safe
    thevirtualpostbox

  2. #2
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Cannot change save handler when headers already sent in

    Ummm. Zen Cart version?

    Php was taken from 5.6 to 7.4. Store is 2 years old (no discussions of upgrades being performed), Zen Cart 1.5.7 (compatible with php 7.4) wasn't released until June of 2020 (just over a year ago now) as identified here: https://www.zen-cart.com/showthread....39#post1369939 So probably still using ZC 1.5.6. I seem to recall that there was possibly a sessions related issue when doing so and that is/was why one of the sessions files was updated/modified in a future version.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2021
    Location
    South Africa
    Posts
    2
    Plugin Contributions
    0

    Default Re: Cannot change save handler when headers already sent in

    Thank Totally Zenned

    I thought that may be an issue. So I downloaded a previous zen-cart-v1.5.6b and bought a new template
    theme869 Electronics Store Responsive ZenCart Template by WT

    When I tried to install the them the installation crashed. undefined constant TEXT_ADMIN_TAB_PREFIX

    [21-Jul-2021 16:43:07 UTC] Request URI: /oldShop/DoriS-aQj-bEach/keepalive.php, IP address: ::1
    #1 require(C:\wamp64\www\oldShop\DoriS-aQj-bEach\includes\init_includes\init_templates.php) called at [C:\wamp64\www\oldShop\includes\autoload_func.php:48]
    #2 require(C:\wamp64\www\oldShop\includes\autoload_func.php) called at [C:\wamp64\www\oldShop\DoriS-aQj-bEach\includes\application_top.php:171]
    #3 require(C:\wamp64\www\oldShop\DoriS-aQj-bEach\includes\application_top.php) called at [C:\wamp64\www\oldShop\DoriS-aQj-bEach\keepalive.php:9]
    in C:\wamp64\www\oldShop\DoriS-aQj-bEach\includes\init_includes\init_templates.php on line 46.


    Please could you give me the value for that constant.

    Many thanks Best Regards

    Stay Safe
    thevirtualpostbox

  4. #4
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Cannot change save handler when headers already sent in

    Quote Originally Posted by thevirtualpostbox View Post
    Thank Totally Zenned

    I thought that may be an issue. So I downloaded a previous zen-cart-v1.5.6b and bought a new template
    theme869 Electronics Store Responsive ZenCart Template by WT
    When I tried to install the them the installation crashed. undefined constant TEXT_ADMIN_TAB_PREFIX

    [21-Jul-2021 16:43:07 UTC] Request URI: /oldShop/admin/keepalive.php, IP address: ::1
    #1 require(C:\wamp64\www\oldShop\admin\includes\init_includes\init_templates.php) called at [C:\wamp64\www\oldShop\includes\autoload_func.php:48]
    #2 require(C:\wamp64\www\oldShop\includes\autoload_func.php) called at [C:\wamp64\www\oldShop\admin\includes\application_top.php:171]
    #3 require(C:\wamp64\www\oldShop\admin\includes\application_top.php) called at [C:\wamp64\www\oldShop\admin\keepalive.php:9]
    in C:\wamp64\www\oldShop\admin\includes\init_includes\init_templates.php on line 46.


    Please could you give me the value for that constant.

    Many thanks Best Regards

    Stay Safe
    thevirtualpostbox
    That define is expected to be contained in admin/includes/languages/english.php
    A copy of that can be seen at: zencart/english.php at v156 · zencart/zencart (github.com)

    If this new template overwrote that file, then something was more than likely done incorrectly. It is important to understand what defines are present (considered necessary for operation) and those things that are modified by a template. Normally even though, a template doesn't modify the admin side's template structure. This template may do that, but it is a commercial template. If it states compatibility with Zen Cart 1.5.6 then the template owner/developer should be able to explain why this issue was raised. Even if this one definition is addressed, it seems likely that other definitions will be missing/incorrect and we'll be back and forth about each individual define that is missing.

    Note, generally speaking (at least at this point in operation/development) a missing define will not cause complete failure of loading the store/admin so it would seem that there is something else that is a more serious problem that has caused "failure". This issue may have caused a notice or possibly a warning, but not an error at PHP 7.4 (if 7.4 is still being incorrectly used)...

    Why was 1.5.6b used and not the more recent 1.5.7c?

    Another thing, when posting an admin myDEBUG log, should obscure the admin path folder name (calling it admin is sufficient).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v155 Cannot modify header information - headers already sent
    By Nick1973 in forum Customization from the Admin
    Replies: 28
    Last Post: 3 Apr 2017, 04:07 PM
  2. cannot modifyheader headers already sent
    By Maria Claudia in forum Addon Payment Modules
    Replies: 4
    Last Post: 4 Feb 2010, 04:42 PM
  3. Cannot modify header information - headers already sent
    By Fred5550 in forum General Questions
    Replies: 2
    Last Post: 12 Feb 2009, 04:38 PM
  4. Cannot modify header information - headers already sent by
    By laserayaneh in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 6 Sep 2006, 12:14 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