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


Groups > comp.lang.php > #6956

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

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From "Peter H. Coffin" <hellsop@ninehells.com>
Newsgroups comp.lang.php
Subject Re: database-based sessions for 3rd party php app
Date Wed, 5 Sep 2012 10:21:36 -0500
Organization A noiseless patient Spider
Lines 36
Message-ID <slrnk4erg0.h39.hellsop@nibelheim.ninehells.com> (permalink)
References <548c30d9-7b7f-4542-b4fd-2aa72a817cc8@googlegroups.com> <k27fgu$m8$1@dont-email.me> <b0a2881e-f90c-4e9b-b24a-59444a2e3b3b@googlegroups.com> <k27hs2$a73$4@news.albasani.net>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="95eff61b8f8136989e561408eae2762f"; logging-data="11983"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188tIwk6Vw5hLbBnU4Rdm33"
User-Agent slrn/0.9.9p1 (OpenBSD)
Cancel-Lock sha1:kwCszYJoIgSAfe8kwt8QPkCrMoQ=
Xref csiph.com comp.lang.php:6956

Show key headers only | View raw


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

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