note 12883 deleted from function.session-destroy by jimw

From: Date: Fri, 07 Dec 2001 00:46:32 +0000
Subject: note 12883 deleted from function.session-destroy by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21737@lists.php.net to get a copy of this message
Hi :) I found that PHP4 didn't like it when you called any session functions AFTER you called session destroy in code e.g. if(condition){ session_destroy(); { else{ session_register("variable"); } it wouldn't like the above code because it seemed to think that it would have to send the session headers AFTER it had destroyed the session (though in reality this wouldn't happen because of the conditional code). The way to currently get by is to make sure any calls to session_destroy() are the last session calls in the code. e.g. if(!condition){ session_register("variable"); { else{ session_destroy(); }

« previous php.notes (#21737) next »