Problème session_start()

Bonjour,

J'ai créé un site qui fonctionne pas trop mal en localhost.

Depuis ce matin, j'essaye de le mettre en ligne sur mon compte free. Depuis, je n'arrive pas à faire de connexion à ma BDD mySql et dès que j'arrive sur une page php, voilà se qu'il me met:

Warning: session_start() [function.session-start]: open(/mnt/123/sdc/8/9/lesmirons/sessions/sess_df8223e899cfaf2bf3f34ad388bc3b85, O_RDWR) failed: No such file or directory (2) in /mnt/123/sdc/8/9/lesmirons/JULIEN/Pages_public/connexionAdmin.php on line 37

à la ligne 37, j'ai juste ça:

// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

Quelqu'un aurait il une idée?
Configuration: Windows XP / Mozilla 1.9.2

4 réponses

  • Votes
  • Date
  • Date décroissante
  1. Hmmm la ligne session-start() doit etre appelée avant tout code html, est-ce bien le cas ?
    1. pas tout à fait non mais c'est dreamweaver qui me l'a généré a cette endroit. Et puis ça fonctionnait très bien en localhost.

      Avant ça, il y a:

      <?php require_once('../Connections/ConnexionMirons.php'); ?>
      <?php
      if (!function_exists("GetSQLValueString")) {
      function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      {
      if (PHP_VERSION < 6) {
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }

      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch ($theType) {
      case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
      case "long":
      case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
      case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
      case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
      case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
      }
      return $theValue;
      }
      }
      ?>
      1. est tu sur que tu n'appelle pas déjà la session dans ../Connections/ConnexionMirons.php ?
        1. Non. Dans ConnexionMirons.php, je n'ai que ça:

          <?php

          $hostname_ConnexionMirons = "sql.free.fr";
          $database_ConnexionMirons = "portail";
          $username_ConnexionMirons = "xxxxxx";
          $password_ConnexionMirons = "xxxxxx";
          $ConnexionPortail = mysql_connect($hostname_ConnexionMirons, $username_ConnexionMirons, $password_ConnexionMirons) or trigger_error(mysql_error(),E_USER_ERROR);

          mysql_select_db($database_ConnexionMirons); // Sélection de la base lesmirons
          ?>