Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1963 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  Cannot modify header information - headers already sent by

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Cannot modify header information - headers already sent by

n°1946379
Keo19
Posté le 01-12-2009 à 17:45:48  profilanswer
 

Bonjour,
 
J'ai un

Code :
  1. [phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /site/index.php:5)

sur www.clhbasket.fr
 
Voici le début de la page :
 
[quote]<!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" xml:lang="fr" lang="fr">
<head>
<?php define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup('');
?>
  <title>Site officiel du Cercle La&iuml;que d'Houdain
&bull; CLH Basket</title>
 
 
  <meta content="fr" http-equiv="Content-Language" />[/quhttp://forum.hardware.fr/message.php?config=hfr.inc&cat=10&sond=0&p=1&subcat=393&dest=&subcatgroup=0ote]
 
Que faire ?
 
Merci.


---------------
Keo
mood
Publicité
Posté le 01-12-2009 à 17:45:48  profilanswer
 

n°1946388
pataluc
Posté le 01-12-2009 à 18:08:24  profilanswer
 

cette erreur te signale que tu ne peux accéder aux en têtes http (sous entendu pour la gestion de la session) parce que tu as déja commencé à écrire une réponse au client.

 

ca veut dire que ton

Code :
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  3. <head>

ne peut pas être avant ton session_begin. tu dois le mettre après:

Code :
  1. <?php define('IN_PHPBB', true);
  2. $phpbb_root_path = './../';
  3. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  4. include($phpbb_root_path . 'common.' . $phpEx);
  5. $user->session_begin();
  6. $auth->acl($user->data);
  7. $user->setup('');
  8. ?>
  9. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  10. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  11. <head>
  12.  <title>Site officiel du Cercle La&iuml;que d'Houdain
  13. &bull; CLH Basket</title>
  14.  
  15.  
  16.  <meta content="fr" http-equiv="Content-Language" />
 


Message édité par pataluc le 01-12-2009 à 18:09:27
n°1946389
Keo19
Posté le 01-12-2009 à 18:13:02  profilanswer
 

Quand je mets mon  

Code :
  1. <?php define('IN_PHPBB', true);
  2. $phpbb_root_path = './../';
  3. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  4. include($phpbb_root_path . 'common.' . $phpEx);
  5. $user->session_begin();
  6. $auth->acl($user->data);
  7. $user->setup('');
  8. ?>


avant le head, le code disparait... :o

n°1946390
pataluc
Posté le 01-12-2009 à 18:16:10  profilanswer
 
n°1946393
Keo19
Posté le 01-12-2009 à 18:20:40  profilanswer
 


 
Celui-ci :  
 

Code :
  1. <?php define('IN_PHPBB', true);
  2.     $phpbb_root_path = './../';
  3.     $phpEx = substr(strrchr(__FILE__, '.'), 1);
  4.     include($phpbb_root_path . 'common.' . $phpEx);
  5.     $user->session_begin();
  6.     $auth->acl($user->data);
  7.     $user->setup('');
  8.     ?>

n°1946457
aideinfo
Posté le 01-12-2009 à 21:57:40  profilanswer
 

Tu veux dire dans le code source de ta page ? C'est un peu le principe d'un langage serveur. S'il apapraissait, ça deviendrait un langage client ;)


---------------
http://www.aideinfo.com/  Whois adresses IP/domaines le plus évolué !!  FAQ Free Mobile
n°1946478
Keo19
Posté le 02-12-2009 à 05:22:44  profilanswer
 

aideinfo a écrit :

Tu veux dire dans le code source de ta page ? C'est un peu le principe d'un langage serveur. S'il apapraissait, ça deviendrait un langage client ;)


 
Ce que je veux dire, c'est que lorsque je mets le code précédemment cité avant :  

Code :
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2.          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  3.          <head>


 
et que j'enregistre le fichier avec l'éditeur de page, le code php define... disparait, j'utilise Nvu.

n°1946482
skeye
Posté le 02-12-2009 à 07:29:31  profilanswer
 

Keo19 a écrit :


 
Ce que je veux dire, c'est que lorsque je mets le code précédemment cité avant :  

Code :
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2.          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  3.          <head>


 
et que j'enregistre le fichier avec l'éditeur de page, le code php define... disparait, j'utilise Nvu.


nvu n'est pas un éditeur php.


---------------
Can't buy what I want because it's free -
n°1946553
Keo19
Posté le 02-12-2009 à 11:46:32  profilanswer
 

skeye a écrit :


nvu n'est pas un éditeur php.


 
Dans ce cas, que me conseillez vous comme éditeur php mais qui peut supporter de l'html.  :??:

n°1946557
pataluc
Posté le 02-12-2009 à 11:54:12  profilanswer
 

vim. :D


Message édité par pataluc le 02-12-2009 à 12:40:21
mood
Publicité
Posté le 02-12-2009 à 11:54:12  profilanswer
 

n°1946716
aideinfo
Posté le 02-12-2009 à 17:53:57  profilanswer
 

HTML Beauty, bloc-notes, et plein d'autres...


---------------
http://www.aideinfo.com/  Whois adresses IP/domaines le plus évolué !!  FAQ Free Mobile

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  Cannot modify header information - headers already sent by

 

Sujets relatifs
[JS] Problème: ""null":Cannot convert undefined or null to object"svn: 'C:\machin is already a working copy for a different URL
probleme session php - header tout ca.Headers et headers_sent (Résolu)
Problème de redirect avec un headerCannot send session cookie et Cannot send session cache limiter
Problèmes de liens, headers et fonctions[PHP] Warning: Cannot modify header information - headers already...
Warning: Cannot modify header information - headers already sent bypb avec le"Cannot modify header information - RESOLU
Plus de sujets relatifs à : Cannot modify header information - headers already sent by


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR