Author Topic: session start error message  (Read 4545 times)

Offline rhussey

  • New member
  • *
  • Posts: 2
    • Windsor Weather
session start error message
« on: February 15, 2014, 01:15:13 PM »
I have a clean index.php file and I get the following error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/58/11287358/html/index.php:1) in /home/content/58/11287358/html/index.php on line 9

http://windsorweather.ca

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: session start error message
« Reply #1 on: February 15, 2014, 01:26:45 PM »
Hi Rhussey,

I think that you've added something in your page
that cause this problem. Just keep in mind that nothing
could be inserted before this line:

session_start()

Regards,
Jacques
Please, consider supporting this site 

Offline rhussey

  • New member
  • *
  • Posts: 2
    • Windsor Weather
Re: session start error message
« Reply #2 on: February 15, 2014, 07:52:59 PM »
Here's what's in the index file:

<?php
$tpl_version = "1.2";
if (isset($_GET['ver'])) {
  echo $tpl_version;
  exit;
   // Date: 2013-08-11
}

session_start(); // start PHP session
// Check if a language has been selected
if (isset($_POST['langue'])) {
  $lang = $_POST['langue'];
  $_SESSION['langue'] = $lang; // store session data
}
elseif(isset($_SESSION['langue'])){
  $lang = $_SESSION['langue']; // Default language
}
else {
  $lang = 'en'; // Default language
  $_SESSION['langue'] = $lang;
}

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: session start error message
« Reply #3 on: February 16, 2014, 06:56:33 AM »
Hi,

headers already sent meen that something is writed
to the page before the start session command. That could be
a javascript or snippet that you included to add EC warnings.

As this page is the only one to have this problem, I suggest
to take back original file to see if trouble come from modifications
or from server configuration (your redirection page!)

Regards,
Jacques
« Last Edit: February 16, 2014, 06:58:48 AM by Mr.Meteo »
Please, consider supporting this site