|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5724 Write-Hanlder. When session_set_save_handler defined, write handler not called
Submitted: 2000-07-21 17:01 UTC Modified: 2000-07-25 18:06 UTC
From: mepooky at freesurf dot ch Assigned:
Status: Closed Package: Session related
PHP Version: 4.0 Release Candidate 2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
4 + 15 = ?
Subscribe to this entry?

 [2000-07-21 17:01 UTC] mepooky at freesurf dot ch
// sess_write never gets called

function sess_open($save_path, $session_name) {
        echo "session_open called<br>";
        return true;

function sess_close() {
        echo "session close called<br>";
        return true;

function sess_read($key) {
        echo "session read called<br>";
        return true;

function sess_write($key, $val) {
        echo "session write called<br>";
        return true;

function sess_destroy($key) {
        echo "session destroy called<br>";
        return true;

function sess_gc($maxlifetime) {
        echo "session gc called<br>";
        return true;


class session{
 Function Session() {
                global $sessionActual;

                session_register( sessionActual );
 Function addHistory( ) { 
                global $sessionActual;

                if ( !isset( $sessionActual ) )
                        $sessionActual = 0;
                        $sessionActual += 1;

$my_session = new session();

configured with:
'./configure' '--with-mysql' '--with-apxs' '--enable-trans-sid'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 03:23 UTC] joey at cvs dot php dot net
This bug is still there on version 4.0.1pl2 and latest CVS.
From what I can tell, call_user_func("sess_write") DOES
eventually get called, but it seems that we have already
closed the stream to the browser by that point.

I spent a/b 3 days digging at this one, and just cannot
seem to make any headway. Can anyone give me a
hand on this (Zeev? Sascha? Andi? Anyone?)
 [2000-07-25 18:06 UTC]
Session write stuff is called on module cleanup, which is why nothing gets
sent to the browser. Write handlers are fixed in CVS. Thanks.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Mar 22 22:03:41 2023 UTC