Deconnexion d'une session :(

Eléphant du PHP | 86 Messages

09 nov. 2005, 20:04

Bonsoir,
Ma sessions fonctionne parfaitement lors de l'enregistrement mais à la deconnexion j'ai à l'écrant :
Warning: session_destroy(): Trying to destroy uninitialized session in /home/lanato/public_html/web/_files/_perso/deconnect.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /home/lanato/public_html/web/_files/_perso/deconnect.php:7) in /home/lanato/public_html/web/_files/_perso/deconnect.php on line 8
Comment cela se fait il?
VOici le code de ma page de deconnexion :
<?php

// On écrase le tableau de session
$_SESSION = array();

// On détruit la session
session_destroy();
$reponse = header("Location: ../../index.php");
	echo $reponse;
?>
MErci de m'aider :)

Eléphanteau du PHP | 33 Messages

09 nov. 2005, 20:30

tu a mi un session_start() avant? au debut de ta page de déconnection

Eléphant du PHP | 86 Messages

09 nov. 2005, 20:45

Et bien la voila mon erreur, merci ;)