Projects / PostgreSQL Session Handler for PHP

PostgreSQL Session Handler for PHP

PostgreSQL Session Handler for PHP is a custom session save handler for PHP4 that uses PostgreSQL as the session cache. This allows multiple Web servers to share a common session storage container, and is useful for allowing Web users to move between machines while maintaining their session state.

Tags
Licenses
Implementation

Recent releases

  •  10 Feb 2003 18:42

    Release Notes: This release corrects a bug that caused session writing to always return failure. Also, the SQL table schema has been updated to support longer session keys.

    •  13 Jan 2003 01:49

      Release Notes: This is a major rewrite / cleanup of the existing code. In particular, it has been updated to reflect the most recent set of changes to the PHP PostgreSQL API.

      •  12 Sep 2002 04:34

        Release Notes: Session rows are now locked over the lifetime of the session. This more accurately reflects the behavior of the default 'files' session driver and prevents session collisions.

        •  31 Jan 2002 04:39

          Release Notes: Changing the session write implementation to perform the update inside of a transaction block.

          •  25 Jan 2002 18:35

            Release Notes: This release adds a small fix to the read function that improves compatibility with PHP 4.1.0 and greater.

            Recent comments

            22 Feb 2008 16:53 merreborn

            Bug in session_write function
            The pgsql_session_write function has a flaw -- it relies on pgsql_session_read to INSERT the database row.

            While pgsql_session_read() is called before pgsql_session_write() 99.9% of the time, there's one case in which this doesn't happen -- when session_regenerate_id() is called. PEAR_Auth calls this function, rendering it incompatible with this package.

            Fortunately, the fix is simple:

            add a call to pgsql_session_read($key) to pgsql_session_write().

            26 Jan 2002 06:04 mystran

            Re: Nice

            To make my self more clear:


            It does update in one transaction, great, but if you happen to be loading two pages with same session at the same time you lose changes by one of them on update. Quick solution might be just to wait until the first page is finished... this may happen with frames and with users browsing with more than one window, especially when the server is a bit loaded or you are doing something slow on one of the browsers..

            26 Jan 2002 05:59 mystran

            Nice
            Only that I'd like to rather have session handler as a module (is this possible ?).
            Some locking to allow safe clustering would be nice, and enable one to use it for corporate-class applications..

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.