Re: database-based sessions for 3rd party php app [message #179029 is a reply to message #179025] |
Wed, 05 September 2012 15:21 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) ![Go to next message Go to previous message](/forum/theme/default/images/down.png) |
Peter H. Coffin
Messages: 245 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Wed, 05 Sep 2012 13:51:14 +0100, The Natural Philosopher wrote:
> Axel wrote:
>
>> Am Mittwoch, 5. September 2012 14:11:11 UTC+2 schrieb Jerry Stuckle:
>>
>>> 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.
>>
>> really? I found just a bunch of stuff describing the general
>> principle. I'll have another look, thanks.
>
>
> Remember you still have to write the handler and make sure its
> included in your app.
Defining the handler in php.ini takes care of the "make sure it's
included in your app" part.
>
>>> Alternatively, you can also set an auto prepend file to include your
>>> session handler code in every file.
>>
>> ah! That's kind of what I had in mind :) . I didn't know that - I'm
>> not a php developer.
>
> That has some performance downsides on scripts that dont need it.
Yup. Which points back to custom handler set in php.ini.
--
Because of the diverse conditions of humans, it happens that some acts
are virtuous to some people, as appropriate and suitable to them, while
the same acts are immoral for others, as inappropriate to them.
-- Saint Thomas Aquinas
|
|
|