Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #6947

Re: database-based sessions for 3rd party php app

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: database-based sessions for 3rd party php app
Date 2012-09-05 08:11 -0400
Organization A noiseless patient Spider
Message-ID <k27fgu$m8$1@dont-email.me> (permalink)
References <548c30d9-7b7f-4542-b4fd-2aa72a817cc8@googlegroups.com>

Show all headers | View raw


On 9/5/2012 7:21 AM, Axel wrote:
> Hi readers,
>
> I am currently trying to increase the performance of a 3rd party learning platform web app we are (still) using. The current setup is to store the PHP sessions on an NFS share, which I personally find not-so-good.
>
> Now I don't want to touch the code of this app, for various reasons.
>
> But I want database sessions.
>
> Is there a good, proven and solid way to move the session management to the database _without_ modyfying the app's code?
>
>
> Grateful for any tips, thanks in advance & greetings,
> Axel.
>

You can set session.save_handler in the php.ini file to point at a 
different handler.  Define your handler and write the data to the 
database.  Instructions are in the PHP doc.

Alternatively, you can also set an auto prepend file to include your 
session handler code in every file.

However, are you sure this will help performance?  Why do you think your 
current session handling is causing performance problems?  Not that I 
like using NFS shares, but they're typically faster than remote databases.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

database-based sessions for 3rd party php app Axel <axel.bock.ba@gmail.com> - 2012-09-05 04:21 -0700
  Re: database-based sessions for 3rd party php app The Natural Philosopher <tnp@invalid.invalid> - 2012-09-05 12:37 +0100
    Re: database-based sessions for 3rd party php app Axel <axel.bock.ba@gmail.com> - 2012-09-05 04:58 -0700
      Re: database-based sessions for 3rd party php app The Natural Philosopher <tnp@invalid.invalid> - 2012-09-05 13:45 +0100
    Re: database-based sessions for 3rd party php app Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-09-05 14:26 +0200
      Re: database-based sessions for 3rd party php app The Natural Philosopher <tnp@invalid.invalid> - 2012-09-05 13:46 +0100
      Re: database-based sessions for 3rd party php app The Natural Philosopher <tnp@invalid.invalid> - 2012-09-05 14:01 +0100
  Re: database-based sessions for 3rd party php app Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-05 08:11 -0400
    Re: database-based sessions for 3rd party php app Axel <axel.bock.ba@gmail.com> - 2012-09-05 05:39 -0700
      Re: database-based sessions for 3rd party php app The Natural Philosopher <tnp@invalid.invalid> - 2012-09-05 13:51 +0100
        Re: database-based sessions for 3rd party php app Axel <axel.bock.ba@gmail.com> - 2012-09-05 06:13 -0700
        Re: database-based sessions for 3rd party php app "Peter H. Coffin" <hellsop@ninehells.com> - 2012-09-05 10:21 -0500
      Re: database-based sessions for 3rd party php app Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-05 10:21 -0400
  Re: database-based sessions for 3rd party php app Jonathan Stein <jstein@image.dk> - 2012-09-05 22:27 +0200

csiph-web