darp Posted May 7, 2010 Share Posted May 7, 2010 I have a couple of tables on a couple of pages that can be appended to customer's invoices. test.php <?php require('includes/application_top.php'); $summary_table= “<table> ...</table>”; $detail_table= “<table> ...</table>”; $_SESSION[ 'summary'] = $summary_table; $_SESSION[ 'detail'] = $detail_table; require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> It works great until the tables reach a certain size. Once the tables hit a limit, various things happen. This is what I get most often. result.php <?php require('includes/application_top.php'); var_dump($_SESSION[ 'summary'] ); //output = string () etc. var_dump($_SESSION[ 'detail'] ); //output = NULL require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> It is always the second global array to receive a value that becomes NULL. So if I put $_SESSION[ 'detail'] = $detail_table; first in test.php $_SESSION[ 'summary'] becomes NULL in result.php. Sometimes the entire session is dumped and the user ends up at the default page which is a form that determines the table size. Sometimes the session is dumped while the user is logging in to the store to make a purchase and the tables are being added to the mysql customer order table in checkout_process.php. In the midst of processing the order the customer is bounced back to the login page. This only happens with large tables stored in the $_SESSION. So my question is, is there something in osCommerce that limits the session size? Does this, extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS) (line 198 of application_top.php) have something to do with it? Link to comment Share on other sites More sharing options...
web-project Posted May 8, 2010 Share Posted May 8, 2010 by default (if not defined in php) is set to 1440 seconds, you can extend to any time at /catalogue/includes/functions/session.php file find if (STORE_SESSIONS == 'mysql') { if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) { $SESS_LIFE = 1440; } change: if (STORE_SESSIONS == 'mysql') { if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) { $SESS_LIFE = [b]your number here[/b]; } Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
darp Posted May 11, 2010 Author Share Posted May 11, 2010 This is not a time issue. The second $_SESSION comes up NULL immediately; as soon as a value is passed to it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.