Results 1 to 5 of 5

Hybrid View

  1. #1
    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.

  2. #2
    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