|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5783 session_register always returns true
Submitted: 2000-07-25 19:21 UTC Modified: 2000-08-23 08:25 UTC
From: china at thewrittenword dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.1pl2 OS: FreeBSD 3.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: china at thewrittenword dot com
New email:
PHP Version: OS:


 [2000-07-25 19:21 UTC] china at thewrittenword dot com
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;



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-23 08:25 UTC]
Yes, this is documented. session_start() returns always true.
session_register() returns true only when the variable is 
successfully registered with the session.


PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 01:01:28 2024 UTC