The PortalSession plug-in now passes the PortalSession primary key through the HTTP header, sybsession_pk. All new applications should use this primary key to look up the PortalSession.
The method used to get the information depends on the application’s environment. For example, in a CGI script, the header is exported by Apache as $HTTP_SYBSESSION_PK.
If a chain of applications requires the primary key, the primary key must be passed from one application to another.