php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22034 with session_set_save_handler session_destroy function is not called anymore
Submitted: 2003-02-03 10:45 UTC Modified: 2003-02-13 19:52 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: tibor dot thurnay at swr3 dot de Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.3.0 OS: Linux (Turbolinux)
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tibor dot thurnay at swr3 dot de
New email:
PHP Version: OS:

 

 [2003-02-03 10:45 UTC] tibor dot thurnay at swr3 dot de
Hi,

i am trying to upgrade to a new Apache(1.3.27) & new php version (4.3.0).

i have somewhat complicated shop system where the developer has written his own session managment functions.
Now when i try this system on a different port everything works fine, except when the session_destroy funktion is called it does not call the function but tries to destroy it itself (which naturally fails).

The other functions for the session are working.
I have looked at the bug database but have not found something going in this direction. i hope i don't have something overlooked...
The system where it is working is:
apache 1.3.26,php 4.2.3

i have both times compiled the apache and the php with the same config lines.

i trie to put the relevant code here:

// Session-Handling 
session_module_name('user');
session_set_save_handler('csess_open', 'csess_close', 'csess_read', 'csess_write', 'csess_destroy', '');

// csess_destroy is the function which does not work

$Session = new ClubSession();  // do some stuff, not session related

// Session starten
session_name(CLUB_SESSION_NAME);
session_start();

// here now some of the shorter csess functions:
function csess_read($sess_key) {
    global $Session;
    return $Session->_APIREAD($sess_key);
}
function csess_destroy($sess_key) {
    global $Session;
    return $Session->_APIDESTROY($sess_key);
}

// in the session class:
function destroy() {
        session_destroy();
    }

with 4.3.0 the function _APIDESTROY gets never called where in 4.2.3 it works. 

for completness:
function _APIDESTROY($sess_key) {
  $this->_DEBUG("Methode: _APIDESTROY('$sess_key')", DEBUG_MTRACE);
        $this->_DISPATCH('destroy');
        // Cart leeren...
        if($this->cartActive() and !$this->oCart->isEmpty()) $this->oCart->clear(true);
        // Session aus Tabelle l?schen
        $this->_oStore->remove($sess_key);
        // Alles auf 'null' setzem
        $this->oCart = null;
        $this->oUser = null;
        $this->_DISPATCH('destroy');
        return true;
    }
the debug message is printed in  4.2.3 in 4.3.0 not. Thats where my assumption comes from that it is a bug or that i am doing something not quite right with the session functions. something that worked in 4.2.3 but not anymore.
(I studied the changelog but got no clues from it :(

Sorry for my bad english, i tried to use where little code because i think more would not help.

thank you :)

ciao
tibor

php configure:
./configure --with-apache=/INSTALLS/apache_1.3.27 --with-xmlrpc --with-xml-dom --with-mysql --with-oci8=/wwwhome/oracle/OraHome1/ --enable-trans-sid --enable-track_vars --with-zlib

register_globals is on

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-03 11:28 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


I can not reproduce this. I tried the example found in 
manual, here:

http://www.php.net/manual/en/function.session-set-save-handler.php

I edited the destroy() function to output 'destroyed' and
when I used session_destroy(), the function was called.

 [2003-02-13 19:52 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 06:01:28 2024 UTC