1 users online. Create an account or sign in to join them.Users

Search

I mean you can save everything you want in it. Like $_SESSION[‘username’] = “phoque”;

Correct. We aren’t doing anything different. Cookie::set() and Cookie::get() provide interfaces for just that.

So why the need for a table when all you do is save a serialized array anyways?

The data within a session is serialised, but you cannot use the unseralize() function on it. It uses some special format specifically for sessions.

session_set_save_handler() allows you to overload the built in session reading/writing functions. If you aren’t using a custom session handler, the session data is saved in a file under /tmp and becomes nearly impossible to do anything with it. We chose to save the session data in the database and doing so affords us some niceties like the ability to query the sessions table and generate the “Who’s Online” feature of this site, or purge sessions easily.

The ONLY different here is one method saves to files, the other saves to the database. The data is the same, but the custom method lets us do more with it.

Alistair, your patch doesn’t seem to work on 2.0.7

Apologies. You need the 2.0.8 RC code.

[EDIT]: I only get this error message every few page loads.

That’s actually a good thing! It means the garbage collection function is getting triggered. (obviously the error is undesirable). You could comment out line 140 if you didn’t want to upgrade the core code to 2.0.8

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details