|  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
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
Have you experienced this issue?
Rate the importance of this bug to you:

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

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_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

// 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() {

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);
        // Cart leeren...
        if($this->cartActive() and !$this->oCart->isEmpty()) $this->oCart->clear(true);
        // Session aus Tabelle l?schen
        // Alles auf 'null' setzem
        $this->oCart = null;
        $this->oUser = null;
        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 :)


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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-03 11:28 UTC]
Please try using this CVS snapshot:
For Windows:

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

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

 [2003-02-13 19:52 UTC]
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-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 15:03:39 2023 UTC