Re: Sessions, Connections ... - Mailing list pgsql-general

From Mitch Vincent
Subject Re: Sessions, Connections ...
Date
Msg-id 001a01c0d650$e2b515a0$1251000a@windows
Whole thread Raw
In response to Sessions, Connections ...  ("Christian Marschalek" <cm@chello.at>)
List pgsql-general
    This is probably better suited for the pgsql-php list but that's OK :-)

    There is always ignore_user_abort()
http://www.php.net/manual/en/function.ignore-user-abort.php -- still, when
the user cancels, it stops execution of the PHP script and all connections
will be closed (and transactions rolled back, I hope)

    PHP scripts (or programs, whichever you prefer) start up and stop every
time they're accessed, so you do have to have every script open a connection
to the database (if you're using the database, of course). You can be brave
and test persistent connections (this allows connection reuse) as the PHP
developers supposedly fixed the problems in 4.0.5 but I haven't tried it
since 4.0.5 so I can't comment.

    Good luck!

-Mitch

----- Original Message -----
From: "Christian Marschalek" <cm@chello.at>
To: "[GENERAL] PostgreSQL" <pgsql-general@postgresql.org>
Sent: Sunday, May 06, 2001 8:22 AM
Subject: Sessions, Connections ...


> Hi there!
>
> Hope someone helps me on this one:
>
> I'm building a system where users can login and perform some actions
> over html with PHP.
> Now I guess it's the best way to let every script open a connection with
> the database (when needed) and cuts it at the end, isn't it? Now what if
> the user cancles the script?
>
> Thanks and cya Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: I lost the pg_control file
Next
From: GH
Date:
Subject: Re: how to close idle connection created with php's pg_pconnect()