Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MySQL as the session holder ??


Guest

Recommended Posts

What is the benefit of doing this, and what does it exactly do? Where do you set it up? It looks like in the configure.php file, but I want to be 100% positive before I do it. Just a little bit of input on this would be great, Thanks!

Link to comment
Share on other sites

It stores the session info in the database versus plain flatfiles.

 

For sites that do not run hardly any traffic, there is perhaps a performance hit by making the db connection (especially if the db is another physical machine) versus just quickly storing the info to a text file on the local machine.

 

I guess other arguments for storing the info in a db could be made (ie data/session analysis, etc.)

Link to comment
Share on other sites

So what is the norm that people use? If I have an average of 50 visitors an hour, what would you recommend? I have been building my site the last few months, and am about ready to start advertising with google, overture.com, etc so I haven't paid attention to this until I just ran into this option again...

Link to comment
Share on other sites

Hmmm, storing the info in a text file on a local machine? I would assume this is a cookie? So storing that info in MYSQL would be better for the googlebots i'm assuming? Or would this have no affect on them?

Link to comment
Share on other sites

Storing sessions in MySQL is ment for people that are on shared servers and have problems (unable to write to / multiple shops using) the /tmp directory.

 

HTH,

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Sorry for sounding so ignorant, but what is a "shared server"? I am having my site hosted by a company in Arizona, so i'm assuming it's a "shared server" because it's hosting other people's sites also?

Link to comment
Share on other sites

Shared server means, that is is "shared" and not "dedicated".

i.e if you pay $3 - $100 you are shared. People that are on dedicated know they are on dedicated.. because they pay for it. Check out Host Rack or Rack Space and you will see what I mean.

 

So if you not the only user on the server, it is shared.. even if you are using a dedicated server -- and have more than 1 domain on the box running osCommerce.. you can run into problems storing things in the /tmp folder.

 

Seeing as you can change the temp directory to your own private folder so that no one else can mess with your session info (works the same with cache info too), the ability to store sessions in the db vs. flatfile really isn't as simple as "shared vs. dedicated". I can think of many examples where even on a dedicated server, storing the sessions in a db would be a plus and a minus.

 

When I meant local machine.. i did NOT mean the local "client" machine. I meant, local server machine. If they are smart, a hosting company will have dedicated db boxes and not run MySQL & Apache on the same computer for a 300+ user shared server.

 

But, osC is database driven anyway, so your performance hit with storing the additional session info versus saving them in flatfiles is not going to be huge. Especially as traffic increases -- you'll want them in the db.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...