Page 1 sur 1

session start warning

Posté : 19 avr. 2010, 12:52
par Ninete
Bonjour,
Ma page me renvoie un warning :
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homez.342/anyseties/www/test/les-produits.php:1) in /homez.342/anyseties/www/test/les-produits.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homez.342/anyseties/www/test/les-produits.php:1) in /homez.342/anyseties/www/test/les-produits.php on line 2
d>
Comprenez-vous ??
Pourtant mon session_start se trouve en tout début de code...

Re: session start warning

Posté : 19 avr. 2010, 12:56
par devlop78
Aucun espace avant <?php

???

Encodage en ISO ou UTF-8 SANS BOM ?

Re: session start warning

Posté : 19 avr. 2010, 13:25
par Ninete
Non aucun
Voici l'en-tete
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Je suis en UTF-8

Re: session start warning

Posté : 19 avr. 2010, 13:39
par devlop78
Oui tu dois avoir un BOM dans ton fichier.

Je te conseille alors de télécharger Notepad++ et de choisir l'encodage "UTF-8 sans BOM". A moins que tu aies encodé ton fichier en ISO-8859-1 ou AINSI mais là je vois pas d'autre explication.

Re: session start warning

Posté : 19 avr. 2010, 13:50
par Ninete
ça marche en UTF-8 sans boom
Merki beaucoup!