pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew McMillan <andrew@catalyst.net.nz>
To: Jurgen Defurne <jurgen.defurne@pandora.be>
Cc: PHP PostgreSQL <pgsql-php@postgresql.org>
Subject: Re: using CURSOR with PHP
Date: 29 May 2002 14:10:50 +1200
Message-ID: <1022638250.8777.17.camel@kant.mcmillan.net.nz> (raw)
In-Reply-To: <3CF3B04C.89224966@pandora.be>
References: <Pine.LNX.4.44.0205281714240.24472-100000@Megathlon.ESI>
	<3CF3B04C.89224966@pandora.be>

On Wed, 2002-05-29 at 04:29, Jurgen Defurne wrote:
> 
> However, the only thing that seems to be missing is a layer between CGI
> and the database. If someone logs in to the system, this layer should
> return a session key and provide a process which opens a connection to
> the database and keeps this open until the user logs out.
> 
> This should be transparent to the application programmer. Since normally
> all traffic between PHP and postgreSQL goes via the pgsql library,
> should it not be possible to add an interface which acts as pgsql and
> handles these sessions and is able to communicate with the real pgsql
> library, which will then be part of the running program ?
> 
> In this way it should then be possible to open transactions across CGI
> invocations and to work with cursors.
> 
> Does anyone know if something like this exists as Free/OSS ?

PHP implements a bunch of session handling functions.  If you desire you
can use the session ID from these to retrieve a record from the
database.

For myself, I have developed my own session handling, rather than use
PHP's.  This was perhaps not a good choice, but it is a path I went down
some years ago now and it is hard to change :-)

PHP sessions do not require the database to be there, of course,
allowing you to stuff information into an in-memory session structure,
but this limits the amount of information that can be associated easily.

My own session management does use the database to hold session- and
user- related information, retrieving (and possibly updating) for each
page the user visits during their session.

Regards,
					Andrew.
-- 
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?




view thread (23+ messages)  latest in thread

Message-ID: <1022638250.8777.17.camel@kant.mcmillan.net.nz>
Permalink:  ../1022638250.8777.17.camel@kant.mcmillan.net.nz/
Also on:    postgresql.org/message-id/1022638250.8777.17.camel@kant.mcmillan.net.nz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: andrew@catalyst.net.nz, jurgen.defurne@pandora.be
  Subject: Re: using CURSOR with PHP
  In-Reply-To: <1022638250.8777.17.camel@kant.mcmillan.net.nz>
  References: <Pine.LNX.4.44.0205281714240.24472-100000@Megathlon.ESI> <3CF3B04C.89224966@pandora.be> <1022638250.8777.17.camel@kant.mcmillan.net.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox