Help - Search - Members - Calendar
Full Version: Problem With Session_start
Zymic Webmaster Forums > Zymic Free Web Hosting > Zymic Free Web Hosting - General Discussion & Help
Pitouli
I have a problem with my website. When I go on it, I can read this :
QUOTE
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/zzl.org/z/e/r/zeraw/htdocs/index.php:1) in /www/zzl.org/z/e/r/zeraw/htdocs/index.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/zzl.org/z/e/r/zeraw/htdocs/index.php:1) in


And I do not understand why...

Thank for your help, and excuse me for my english,

Pitouli

This is my page's code (index.php) :

CODE
<?php
session_start(); // On démarre la session avant toute chose
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Zeraw</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="header">
<?php
if (isset($_SESSION['membre_rang']) == FALSE)
{
?>
<p class="droite"><a href="index.php?page=identification"><img src="images/images_mise_en_page/zone_membre_connexion.png" alt="Connexion" title="Connexion" /></a></p>
<?php
}
else
{
?>
<p class="droite"><a href="partie_membre/destruction_session.php"><img src="images/images_mise_en_page/zone_membre_deconnexion.png" alt="Deconnexion" title="Deconnexion" /></a></p>
<?php
}
?>
<p class="header_hover"></p>
</div>

<div id="barre">

<p><a href="index.php?page=accueil">Accueil</a> - <a href="index.php?page=logiciels">Logiciels</a> -
<?php
if (isset($_SESSION['membre_rang']) == FALSE)
{
?>
<a href="index.php?page=inscription">Inscription</a>
<?php
}
else
{
?>
<a href="index.php?page=identification">Zone membre</a>
<?php
}
?>
</p>

</div>

<div id="corps">
<?php
if ($_GET['page'] == "accueil")
{
include("accueil.php");
}
elseif ($_GET['page'] == "identification")
{
include("identification.php");
}
elseif ($_GET['page'] == "logiciels")
{
include("logiciels.php");
}
elseif ($_GET['page'] == "inscription")
{
include("inscription.php");
}
elseif ($_GET['page'] == "acces_interdit")
{
include("partie_securite/acces_interdit.php");
}
else
{
include("accueil.php");
}
?>
</div>

<div id="footer">

<p> site optimisé pour un navigateur récent tel que firefox - <a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0 Strict</a> - Design by Pitouli</p>
<p>Les logiciels sont la propriété de leurs auteurs respectifs</p>

</div>

</body>
</html>
Ed
Is this page being included from another script?

If not, check for white space at the beginning of the script.
Pitouli
Yes, I have already check...
And no, this page is not included form another script : it is the index of th website.
Thank for your answer ! smile.gif
Pitouli
Ed
Could you zip the file and upload it please. It might be a hidden character or similar, I've seen notepad (if you use that) drop in some evils with their encoding, have you tried saving it with another editor?
Pitouli
Thank you !! smile.gif

But i have find what is the problem !! smile.gif

In fact, I am using dreamweaver, and the problem is relative at the BOM... And I have fin how desactivate it...

I do not say if I am comprehensive ! wink.gif

Tahnks a lot, and excuse my english,

Pitouli
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.