problems creating a good auth/session control in my scripts

From: Date: Tue, 08 May 2001 15:03:54 +0000
Subject: problems creating a good auth/session control in my scripts
Groups: php.general 
Request: Send a blank email to php-general+get-51906@lists.php.net to get a copy of this message
Hello, I create an auth system using NDS as a LDAP server. Works fine. The problem is with the session handling (from my part probabilly)... I am using the PHP session functions. Again, works fine. register the sessions, the variables. But I am beeing unable to destroy the session. To destroy the session I am doing the folowing: <?php //####[ session_destroy.php ] //####[ c: 05/03/2001/09:25 - lu: 05/08/2001/21:31 ] //# Objective: Destroying the Session stored in the user computer //# Type: File //# Input: { //#### Session Name [$sessionName] (not yet implemented) //#### Redirection Location (Site Location) [$redirLocation] //#### Redirection Pointer (Template File) [$redirPointer] } //# Output: Nothing //#### // start the session session_start(); // unregistering the variables // defining an array of the names array sessionVarNames ("sessionId","cn","ou"); // unregistering the variables finally foreach ($sessionVarNames as $tempVar) { session_unregister($tempVar); } // destroying the session session_destroy(); // redirecting to $redirPointer // mounting the URL correctly $URL = $redirLocation."/".$redirPointer; // redirecting finally header ("Location: $URL"); ?> By everything that I read until now this is correct. As I am having this headache for a couple days and probably I am screwing up, I would like to ask you kind gents to help me out with ideas or maybe samples of a good session handling. Please help, TIA Rom

« previous php.general (#51906) next »