From: [EMAIL PROTECTED]
Operating system: Linux (Turbolinux)
PHP version: 4.3.0
PHP Bug Type: Session related
Bug description: with session_set_save_handler session_destroy function is not called
anymore
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 bug report at http://bugs.php.net/?id=22034&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22034&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22034&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22034&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22034&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22034&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22034&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22034&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22034&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22034&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22034&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22034&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22034&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22034&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22034&r=gnused