PHP 4.0 Bug #5783: session_register always returns true
| From: | china at thewrittenword dot com | Date: | Tue, 25 Jul 2000 17:21:30 +0000 |
| Subject: | PHP 4.0 Bug #5783: session_register always returns true | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-26022@lists.php.net to get a copy of this message | ||
From: china@thewrittenword.com
Operating system: FreeBSD 3.4
PHP version: 4.0.1pl2
PHP Bug Type: Session related
Bug description: session_register always returns true
I have sessions working to a postgresql database. To test out what happens during a failure, I
replaced the calls to _read and _write in the custom save handler to always return false. How can I
tell if sessions are working correctly? session_start() always returns true (I thought it would
return false as my _write handler was always returning false).
Here's the session handler code:
function pgsql_session_open($save_path, $session_name)
{
return false;
}
function pgsql_session_close()
{
return false;
}
function pgsql_session_read($key)
{
return false;
}
function pgsql_session_write($key, $val)
{
return false;
}
function pgsql_session_destroy($key)
{
return false;
}
function pgsql_session_gc($maxlifetime)
{
return false;
}
session_set_save_handler(
'pgsql_session_open',
'pgsql_session_close',
'pgsql_session_read',
'pgsql_session_write',
'pgsql_session_destroy',
'pgsql_session_gc'
);