Jump to content

Recommended Posts

The argument that is usually used as a reason to not use the standard file handler is because on a shared server all the session data files of the accounts are stored in one place (a security issue) and the shortest garbage collection maxlife time of any script will delete your session data files.

 

Both of these problems can be solved by setting the session save path to be a "private" folder within your account space. A private folder is either one outside of your web document root folder or if that is not an option, a folder within your document root but is protected from any browser/http access using a .htaccess file.

 

Also, by setting your own session save handler for a database, that uses parsed/tokenized/interpreted php code, instead of using php's built-in file handler, that uses complied C code, your session operations will take about 20 times the amount of time that the file handler takes (plus the additional time for the database queries over just the file system operations). This is important when you are getting 100's and 1000's of hits per second on a site.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.