Bonjour,
J'ai un hébergement chez amen sur lequel je souhaite publier mon site. Cependant, j'ai un problème avec la fonction session_start();
J'ai créé un fichier très simple:
index.php
<php
session_start();
?>
encodé en utf-8.
J'obtiens les erreurs suivantes:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /htdocs/public/www/draft/index.php:1) in /htdocs/public/www/draft/index.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /htdocs/public/www/draft/index.php:1) in /htdocs/public/www/draft/index.php on line 2
Savez-vous d'où peut venir le problème ? De plus, il n'y a pas d'espace avec "<?php".
Merci par avance pour votre aide !
Modifié par olivier_nice (14 Dec 2009 - 12:02)
J'ai un hébergement chez amen sur lequel je souhaite publier mon site. Cependant, j'ai un problème avec la fonction session_start();
J'ai créé un fichier très simple:
index.php
<php
session_start();
?>
encodé en utf-8.
J'obtiens les erreurs suivantes:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /htdocs/public/www/draft/index.php:1) in /htdocs/public/www/draft/index.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /htdocs/public/www/draft/index.php:1) in /htdocs/public/www/draft/index.php on line 2
Savez-vous d'où peut venir le problème ? De plus, il n'y a pas d'espace avec "<?php".
Merci par avance pour votre aide !
[code] Modifié par olivier_nice (14 Dec 2009 - 12:02)