le 23/12/2010 à 17:35
bibi_6919
bonjour, j'ai un probleme avec ce script :
sur ma page quand je m'identifie (j'ai fait mon compte admin) et bien sa me marque sa :
Warning: session_start() [function.session-start]: open(/mnt/169/sdd/f/2/thenavy/sessions/sess_0819b82c099ad34c2b0b1977ae68ebb3, O_RDWR) failed: No such file or directory (2) in /mnt/169/sdd/f/2/thenavy/index.php on line 19
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /mnt/169/sdd/f/2/thenavy/index.php:19) in /mnt/169/sdd/f/2/thenavy/index.php on line 19
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mnt/169/sdd/f/2/thenavy/index.php:19) in /mnt/169/sdd/f/2/thenavy/index.php on line 19
Warning: Cannot modify header information - headers already sent by (output started at /mnt/169/sdd/f/2/thenavy/index.php:19) in /mnt/169/sdd/f/2/thenavy/index.php on line 21
Warning: Unknown(): open(/mnt/169/sdd/f/2/thenavy/sessions/sess_0819b82c099ad34c2b0b1977ae68ebb3, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/mnt/169/sdd/f/2/thenavy/sessions) in Unknown on line 0
Merci de m'aider
<?php
// on teste si le visiteur a soumis le formulaire de connexion
if (isset($_POST['connexion']) && $_POST['connexion'] == 'Connexion') {
if ((isset($_POST['login']) && !empty($_POST['login'])) && (isset($_POST['pass']) && !empty($_POST['pass']))) {
$base = mysql_connect ('localhost', 'name', 'mdp');
mysql_select_db ('membre', $base);
// on teste si une entrée de la base contient ce couple login / pass
$sql = 'SELECT count(*) FROM membre WHERE login="'.mysql_escape_string($_POST['login']).'" AND pass_md5="'.mysql_escape_string(md5($_POST['pass'])).'"';
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$data = mysql_fetch_array($req);
mysql_free_result($req);
mysql_close();
// si on obtient une réponse, alors l'utilisateur est un membre
if ($data[0] == 1) {
session_start();
$_SESSION['login'] = $_POST['login'];
header('Location: membre.php');
exit();
}
// si on ne trouve aucune réponse, le visiteur s'est trompé soit dans son login, soit dans son mot de passe
elseif ($data[0] == 0) {
$erreur = 'Compte non reconnu.';
}
// sinon, alors la, il y a un gros problème :)
else {
$erreur = 'Probème dans la base de données : plusieurs membres ont les mêmes identifiants de connexion.';
}
}
else {
$erreur = 'Au moins un des champs est vide.';
}
}
?>
sur ma page quand je m'identifie (j'ai fait mon compte admin) et bien sa me marque sa :
Warning: session_start() [function.session-start]: open(/mnt/169/sdd/f/2/thenavy/sessions/sess_0819b82c099ad34c2b0b1977ae68ebb3, O_RDWR) failed: No such file or directory (2) in /mnt/169/sdd/f/2/thenavy/index.php on line 19
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /mnt/169/sdd/f/2/thenavy/index.php:19) in /mnt/169/sdd/f/2/thenavy/index.php on line 19
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mnt/169/sdd/f/2/thenavy/index.php:19) in /mnt/169/sdd/f/2/thenavy/index.php on line 19
Warning: Cannot modify header information - headers already sent by (output started at /mnt/169/sdd/f/2/thenavy/index.php:19) in /mnt/169/sdd/f/2/thenavy/index.php on line 21
Warning: Unknown(): open(/mnt/169/sdd/f/2/thenavy/sessions/sess_0819b82c099ad34c2b0b1977ae68ebb3, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/mnt/169/sdd/f/2/thenavy/sessions) in Unknown on line 0
Merci de m'aider