"Richard Lynch" <[EMAIL PROTECTED]> wrote:
> The writing of the session data occurs *after* the server-browser HTTP
> connection is cut.
> If you have any error-reporting happening in your session_write function,
> you won't see it.
> Alter that function to log errors to a file or something.
It seems the pgsql_session_write() function is not even being invoked.
Here it is:
+-----------------------------------------------------------------
| function pgsql_session_write($key, $val)
| {
| /* debugging */
| $fp = fopen("/tmp/phpdebugwrite","w") or die ("can't open file");
| fwrite($fp, "HERE");
| fclose($fp);
| /* end debug */
|
| global $pgsql_session_handle, $pgsql_session_table;
|
| $key = addslashes($key);
| $val = addslashes($val);
| $now = time();
|
|
|
| /*
| * Delete any existing data for this session and then insert a new row
| * containing the current session data, all in a single transaction.
| * This should prevent collisions between multiple session instances.
| *
| * Thanks to "Will Fitzgerald" <[EMAIL PROTECTED]>.
| */
| $query = 'begin; ';
| $query .= "delete from $pgsql_session_table where session_id = '$key'; ";
| $query .= "insert into $pgsql_session_table values('$key', $now, '$val'); ";
| $query .= 'commit;';
| $result = @pg_exec($pgsql_session_handle, $query);
|
| $ret = (pg_cmdtuples($result) == 0);
| pg_freeresult($result);
|
| return ($ret);
| }
+-----------------------------------------------------------------
I've added the debugging statements at the top. Can you see anything
wrong with this function? At the end of the include file in which
this appears, is the session_set_save_handler() call:
session_set_save_handler(
'pgsql_session_open',
'pgsql_session_close',
'pgsql_session_read',
'pgsql_session_write',
'pgsql_session_destroy',
'pgsql_session_gc'
);
Thanks,
--
Steve <[EMAIL PROTECTED]>
"And when you walk in golden halls, you get to keep the gold that falls"
-- Black Sabbath, "Heaven and Hell"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]