Re: database-based sessions for 3rd party php app [message #179019 is a reply to message #179016] |
Wed, 05 September 2012 12:11 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
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(at)attglobal(dot)net
==================
|
|
|