Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Huge Session Values trying to post

    I haven't seen this one...it loads in the footer... I ommited the majority because the log file is 2.5MB in size and I replaced with a "..."

    It's very odd because it appears in the footer so I suspect

    [08-Oct-2015 23:04:44 America/New_York] PHP Fatal error: 1153:Got a packet bigger than 'max_allowed_packet' bytes :: insert into sessions (sesskey, expiry, `value`)
    values ('c13a3ab8007661fd0b56f64c845940e4', 1444361324, 'c2VjdXJpdHlUb2tlbnxzOjMyOiIxZjQyMDc4OGMxMTdkNjBlMWExNDMzOWNkN...iMTBfMzI5XzI4Nj ZfMjg2OCI7czo1OiJuUGF0aCI7czoxNjoiMTBfMzI5XzI4NjZfMjg2OCI7fX1zOjIxOiJpc19kZWVwZX N0X2NhdHNfYnVpbHQiO2I6MDtzOjExOiJwYXJlbnRfaHRtbCI7czowOiIiO3M6MTA6ImNoaWxkX2h0bW wiO3M6MDoiIjtzOjEwOiJjdXJyZW50X2lkIjtpOi0xO3M6MTY6ImV4Y2VwdGlvbmFsX2xpc3QiO2E6MD p7fXM6NjoibmV3X2lkIjtOO3M6MTE6ImlzX2F0dGFjaGVkIjtiOjA7fXNlc3Npb25fY291bnRlcnxiOj E7Y3VzdG9tZXJzX2lwX2FkZHJlc3N8czoxMzoiOTcuODguMjQ0LjE3OCI7', expiry=1444361324 ==> (as called by) /home/********/public_html/dev/includes/functions/sessions.php on line 70 <== in /home/********/public_html/dev/includes/classes/db/mysql/query_factory.php on line 155

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Huge Session Values trying to post

    I can't say I've ever seen that.
    But it'd be helpful to know which pages it's being triggered on.
    lat9's latest Debug Backtrace includes tracking of which URL was in play when the error was triggered. Perhaps that can help you narrow things down somewhat? myDEBUG Backtrace
    .

    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.

  3. #3
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Huge Session Values trying to post

    Quote Originally Posted by DrByte View Post
    I can't say I've ever seen that.
    But it'd be helpful to know which pages it's being triggered on.
    lat9's latest Debug Backtrace includes tracking of which URL was in play when the error was triggered. Perhaps that can help you narrow things down somewhat? myDEBUG Backtrace

    About what I expected, when I commented out line 70 on includes/functions/sessions.php
    PHP Code:
    $result $db->Execute($sql); 
    It fixed the error but obviously broke the sessions

    Here is the backtrace:
    [09-Oct-2015 12:45:36 America/New_York] Request URI: /dev/, IP address: **.**.**.**
    #1 trigger_error() called at [/home/***/public_html/dev/includes/classes/db/mysql/query_factory.php:155]
    #2 queryFactory->show_error() called at [/home/***/public_html/dev/includes/classes/db/mysql/query_factory.php:132]
    #3 queryFactory->set_error() called at [/home/***/public_html/dev/includes/classes/db/mysql/query_factory.php:262]
    #4 queryFactory->Execute() called at [/home/***/public_html/dev/includes/functions/sessions.php:70]
    #5 _sess_write()
    #6 session_write_close() called at [/home/***/public_html/dev/includes/application_bottom.php:16]
    #7 require(/home/**/public_html/dev/includes/application_bottom.php) called at [/home/***/public_html/dev/index.php:105]

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Huge Session Values trying to post

    1. Line 70 of that file in the release-version of v1.5.4 says:
    Code:
            set expiry = '" . zen_db_input($expiry) . "', value = '" . zen_db_input($val) . "'
    2. You said this "huge session value" occurs when "trying to POST".
    I'm assuming there's nothing significant about "what" you're trying to POST, and that it happens on "any page" instead of isolated to just a specific page, else you would have mentioned those details.
    You also didn't mention PHP or MySQL versions.


    I'm guessing that you've modified the cart in such a way that there's a ton of data being saved to $_SESSION variables, and if you wish to continue doing that (not recommended) then you may need to increase both your MySQL configuration for max bytes and your db table definition for the 'value' field ... and perhaps more things caused as side-effects.
    .

    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.

  5. #5
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Huge Session Values trying to post

    Quote Originally Posted by DrByte View Post
    1. Line 70 of that file in the release-version of v1.5.4 says:
    Code:
            set expiry = '" . zen_db_input($expiry) . "', value = '" . zen_db_input($val) . "'
    2. You said this "huge session value" occurs when "trying to POST".
    I'm assuming there's nothing significant about "what" you're trying to POST, and that it happens on "any page" instead of isolated to just a specific page, else you would have mentioned those details.
    You also didn't mention PHP or MySQL versions.


    I'm guessing that you've modified the cart in such a way that there's a ton of data being saved to $_SESSION variables, and if you wish to continue doing that (not recommended) then you may need to increase both your MySQL configuration for max bytes and your db table definition for the 'value' field ... and perhaps more things caused as side-effects.
    Boy I made helping me soo difficult...

    I incorrectly used the word post I should have said "insert into the database"

    PHP Version: 5.5.27
    Database: MySQL 5.6.23

    It's a 3rd party template. The part about saving a bunch in the session is very interesting...and you were exactly right!

    This I think could be the problem...I think saving the categories descriptions down 9 levels to a $_SESSION[] could have been an issue...

    PHP Code:
    <div id="tm_categories" class="clearfix">
                <?php echo $_SESSION['category_tree']->buildCategoryString(
                
    '<ul class="{class}">{child}</ul>','<li class="{class}"><a class="category-top" href="{link}" title="{name}"><span>{name}</span></a>{child}</li>'00);?>
            </div>
    combined with:

    PHP Code:
    while (!$categories->EOF) {
                    
    $this->category_tree[$categories->fields['categories_id']]['name'] = $categories->fields['categories_name'];
                    
    $this->category_tree[$categories->fields['categories_id']]['image'] = $categories->fields['categories_image'];
                    
    $this->category_tree[$categories->fields['categories_id']]['description'] = $categories->fields['categories_description'];
                    
    $this->category_tree[$categories->fields['categories_id']]['parent_id'] = $categories->fields['parent_id'];
                    
    $this->category_tree[$categories->fields['categories_id']]['path'][] = $categories->fields['categories_id'];
                    
    $this->category_tree[$categories->fields['parent_id']]['sub_cats'][] = $categories->fields['categories_id'];
                    
    $categories->MoveNext();
                } 
    I modified the includes/application_bottom.php
    to read:
    PHP Code:
    // close session (store variables)
    unset($_SESSION['category_tree']);
    session_write_close(); 
    Thanks for your help as always hopefully this helps someone else too!

 

 

Similar Threads

  1. v139h Warning: session_start(): Trying to destroy uninitialized session
    By batteryman in forum General Questions
    Replies: 13
    Last Post: 21 Apr 2016, 07:31 PM
  2. Session Table is huge - 500MB only 4 rows?
    By SarahL in forum General Questions
    Replies: 3
    Last Post: 7 Jun 2011, 06:31 PM
  3. cannot create session when trying to update database
    By brad_at_foreverybody in forum Upgrading from 1.3.x to 1.3.9
    Replies: 12
    Last Post: 27 Oct 2010, 09:07 PM
  4. sql command to change values - Canada Post
    By tony_sar in forum Addon Shipping Modules
    Replies: 1
    Last Post: 14 Mar 2009, 07:49 PM
  5. I'm trying to post an issue but can't post!
    By the_archangel in forum General Questions
    Replies: 6
    Last Post: 23 Mar 2008, 08:29 AM

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