Darklings Posted April 5, 2007 Posted April 5, 2007 Hi, I understand that SESSIONS are needed, i asume to keep track of things, like what is in a customers shoppingcart etc... BUT.... when i recently tested my shop for speed, i noticed something.. I let my qry's be printed at the bottom of each page (with the time) for testing perpose. I have a shop setup exactly the same (same files/same db) local (Apache/2.2.0 (Win32) / PHP 5.1.2 / MySQL 5.0.18-nt-log) as on my host (Apache/1.3.33 (Unix) / PHP 4.3.4 / MySQL 3.23.58). BUT then, i noticed a big difference in my query's... There seem to be 3 More query on my localhost then online!!!!!!! These are the three qry's => [1]=> select value from sessions where sesskey = '48e76370242fa5bd04c9cbcb850aeaf2' and expiry > '1175062079'[7] => select count(*) as total from sessions where sesskey = '48e76370242fa5bd04c9cbcb850aeaf2' [8] => update sessions set expiry = '1175063520', value = 'cart|0:12:\"shoppingCart\":5:(s:8:\"contents\";a:6:(i:664[...blablabla-including_email+pass+allecustomersinfo....];' where sesskey = '48e76370242fa5bd04c9cbcb850aeaf2' Is it a problem that those three qry's dont show up on my online shop???? Everything seems to work fine tho, i havent seen any real problems (i guess, as far as i know anything about it), I did notice that the url doesn't carry any sessionkey eather... Still, shoppingcart acts the same, and keeps track of my items when i relogin... Is this a problem? How do SESSIONS work? What do they do.. and why??? Thanks in advance Kind Regards Tom Even in this dark place, yes, I am afraid of my own shadow. Contributions | KnowledgeBase | osCommerce 2.2 pdf
Darklings Posted April 10, 2007 Author Posted April 10, 2007 No one knows how SESSIONS work? Or if i need those qry's showing up local and not on host??? Even in this dark place, yes, I am afraid of my own shadow. Contributions | KnowledgeBase | osCommerce 2.2 pdf
Guest Posted April 10, 2007 Posted April 10, 2007 these extra queries are coming from the session read/write handlers when you setup the sessions to be stored in the database. If you have the sessions stored in files then you won't see them. The switch that controls the overall behavior for this is in your includes\configure.php define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
Darklings Posted April 11, 2007 Author Posted April 11, 2007 these extra queries are coming from the session read/write handlers when you setup the sessions to be stored in the database. If you have the sessions stored in files then you won't see them. The switch that controls the overall behavior for this is in your includes\configure.php define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' You're right! Thats why i didnt notice where the difference was.. my config file in my local folder has it set to 'mysql'.. Online its set empty. What is the best way? I asume they both work? But less qry's is faster? Thnx Enigma! Good to see you are still around :) Even in this dark place, yes, I am afraid of my own shadow. Contributions | KnowledgeBase | osCommerce 2.2 pdf
Guest Posted April 11, 2007 Posted April 11, 2007 Hi Tom, how it's going? Use the mysql option. You can have easier handling to session cleanup for instance.
Darklings Posted April 11, 2007 Author Posted April 11, 2007 Okey, thnx, i'v put it on :) Even in this dark place, yes, I am afraid of my own shadow. Contributions | KnowledgeBase | osCommerce 2.2 pdf
Recommended Posts
Archived
This topic is now archived and is closed to further replies.