ID:               22034
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Session related
 Operating System: Linux (Turbolinux)
 PHP Version:      4.3.0
 New Comment:

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.



Previous Comments:
------------------------------------------------------------------------

[2003-02-03 10:45:38] [EMAIL PROTECTED]

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22034&edit=1

Reply via email to