IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

[Sécurité] problème sur session_start : les entêtes ont déjà été envoyées


Sujet :

Langage PHP

  1. #21
    Membre éprouvé
    Homme Profil pro
    Conseil - Consultant en systèmes d'information
    Inscrit en
    Juin 2003
    Messages
    909
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Suisse

    Informations professionnelles :
    Activité : Conseil - Consultant en systèmes d'information
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2003
    Messages : 909
    Points : 1 014
    Points
    1 014
    Par défaut je bloque
    alors là, je ne vois vraiment pas d'où ça peut venir.

  2. #22
    Membre habitué
    Inscrit en
    Janvier 2007
    Messages
    437
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 437
    Points : 184
    Points
    184
    Par défaut
    J'ai reecri le code au complet, du coup je n'ai plus d'erreur, merci a tous ceux qui m'ont aider

  3. #23
    Membre éprouvé
    Homme Profil pro
    Conseil - Consultant en systèmes d'information
    Inscrit en
    Juin 2003
    Messages
    909
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Suisse

    Informations professionnelles :
    Activité : Conseil - Consultant en systèmes d'information
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2003
    Messages : 909
    Points : 1 014
    Points
    1 014
    Par défaut super que ça fonctionne.
    Ce qui serait intéressant, c'est que tu saches pourquoi ça fonctionne maintenant et pas avant. Compare ton code actuel avec celui posté en premier et dis nous où est la différence. Ca pourra en aider d'autres aussi.

    C'est un réel plaisir de t'avoir aidé. Ce qui me ferait également plaisir c'est que tu nous dises d'où venait le problème et quel a été la solution.

  4. #24
    Membre habitué
    Inscrit en
    Janvier 2007
    Messages
    437
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 437
    Points : 184
    Points
    184
    Par défaut
    Reel je n'ai pas reussi a trouver la reel cause, mais j'ai retrouvé une autre page modules.php, j'ai modifier certaine chose, voilà la nouvelle, de plus le type pour qui je bosse est satisfait car je lui ai changer le design du site dans la même occasion et sa lui convient parfaitement !


    Modules.php

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    <?
    session_start();
     
    require('config.inc.php');
     
    $page = $_GET['page'];
    if($page == NULL)
    {
    $page = "Accueil";
    }
    if($page == "Login")
    {
    require('modules/login_erreur.php');
    }
    ?>
     
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="parametres.css">
    <title>Horse Virtuel :: <? echo $page; ?></title>
    <style type="text/css">
    <!--
    .Style1 {
    	font-size: 14px;
    	font-weight: bold;
    	color: #000000;
    }
    -->
    </style>
    </head>
    <body bgcolor="#6498C1" topmargin=0 bottommargin=0>
    <table border="0" align="center" width=900 cellpadding=0 cellspacing=0>
    <tr>
       <td valign=top>
     
     
    <!-- DEBUT DU HEADER -->
    <table border="0" align="center" width="900" cellpadding=0 cellspacing=0>
    <tr>
       <td valign=top>
     
    <table border="0" cellpadding="0" cellspacing="0" width="900">
    <tr>
       <td background="img/bg01.PNG" width="14" valign="top">
    <table border="0" width="900"  cellpadding="0" cellspacing="0">
    <tr>
       <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="900" height="307" title="banniere">
           <param name="movie" value="img/ban.swf">
           <param name="quality" value="high">
           <embed src="img/ban.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="900" height="307"></embed>
         </object></td>
       </tr>
      </table>
    <!-- FIN DU HEADER -->
    <!-- DEBUT DE LA NAVIGATION -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
    <tr>
       <td valign=top width="200" bgcolor="#cad5dc">
     
    <?
    include('inc/menu_joueur.php');
    ?>
    <br></td>
    </tr>
    <tr>
    <td bgcolor="#adb4cc" height="3"></td>
    </tr>
    </table>
    <br>
    <br>
    <table border="1" align="center" cellpadding="0" cellspacing="0" width="100%">
    <tr>
       <td background="img/haut_menu01.PNG" width="165" height="25"><b><div align="center">Divers</div></b></td>
    </tr>
    <tr>
       <td bgcolor="#FFFFFF" valign=top><br>
    <table border="0" align="center" width=100%>
    <tr>
       <td valign=top>
    <? include('inc/divers.php'); ?></td>
    </td>
    </tr>
    </table>
     
    <br>
    </td>
    </tr>
    <tr>
    <td bgcolor="#adb4cc" height="3" ></td>
    </tr></td>
    </table>
     
       <td width="466" background="img/FC.png">
       <td bgcolor="#cad5dc" width="466" align="center" valign="top" style="background-image:url(img/bg.jpg); background-repeat:no-repeat; background-position:bottom; background-color:#CAD5DC;">
    &nbsp;
    <table width="515" border="0" cellspacing="0" cellpadding="0" >
    											<tr>
    												<td>
     
    														<div align="center"><h2>Espace <? echo $page; ?></h2></div><br>
     
    												</td>
    											</tr>
    										</table>
        <br />
     
    								<? 
    										$filename = 'modules/'.$page.'.php';
    										if (file_exists($filename)) {
    										include($filename); 
    										}
    										else
    										{
    										echo "Erreur le module n'existe pas!!!!";
    										}
    										?>
    </p><div style="height:389px;"></div></td>
       <td width="10" bgcolor="#FFFFFF"></td>
     
     <td valign=top width="200" bgcolor="#cad5dc"><table border="1" align="center" cellpadding="0" cellspacing="0" width="185">
    <table border="1" align="center" cellpadding="0" cellspacing="0" width="185">
    <tr>
       <td background="img/haut_menu01.PNG" width="165" height="25"><b><div align="center">Login</div></b></td>
    </tr>
    <tr>
       <td bgcolor="#FFFFFF" valign=top><br>
    <table border="0" align="center" width=70%>
    <tr>
       <td valign=top>
    <? include('inc/login.php'); ?></td>
    </tr>
    </table>
     
    <br></td>
    </tr>
    <tr>
    <td bgcolor="#adb4cc" height="3"></td>
    </tr>
    </table>
    <br>
    <br>
    <table border="1" align="center" cellpadding="0" cellspacing="0" width="185">
    <tr>
       <td background="img/haut_menu01.PNG" width="165" height="25"><b><div align="center">Statistiques:</div></b></td>
    </tr>
    <tr>
       <td bgcolor="#FFFFFF" valign=top><br>
    <table border="0" align="center" width=70%>
    <tr>
       <td valign=top>
    <? include('inc/stats.php'); ?></td>
    </tr>
    </table>
     
    <br></td>
    </tr>
    <tr>
    <td bgcolor="#adb4cc" height="3"></td>
    </tr>
    </table><br>
    <br>
    <table border="0" align="center" cellpadding="0" cellspacing="0" width="185">
    <tr>
       <td height="98" width="196" style="background-image:url(img/haut_menu01.gif); background-position:center; background-repeat:no-repeat;"><b><br><br><div align="center">Recherche</div></b></td>
    </tr></td><td bgcolor="#FFFFFF" valign="top">
    <table border="0" align="center" valign="top" width=70%>
    <tr><td>
    <? include('inc/recherche.php'); ?></td>
    </tr>
    </table>
     
    <br></td>
    </tr>
    <tr>
    <td bgcolor="#adb4cc" height="3"></td>
    </tr>
    </table>
    <br>
    <br>
    <table border="1" align="center" cellpadding="0" cellspacing="0" width="185">
    <tr>
       <td background="img/haut_menu01.PNG" width="165" height="25"><b><div align="center">Top 10!</div></b></td>
    </tr>
    <tr>
       <td bgcolor="#FFFFFF" valign=top><br>
    <table border="0" align="center" width=70%>
    <tr>
       <td valign=top>
    <? include('inc/top.php'); ?>
    </td>
    </tr>
    </table>
     
    <br>
    </td>
    </tr>
    <tr>
    <td bgcolor="#adb4cc" height="3">
    </td>
    </tr>
    </table>
    </div></td></tr></table>
    <tr>
    <!-- PIED MERCI DE LAISSER LES LIENS -->
    <td colspan=5 style="background-color:#adb4cc; background-image:url(img/fin.PNG); background-repeat:no-repeat; padding-top:4px;" width="900" height="23">
    <div align="center"><font color="#333333"><b>Ce site a &eacute;t&eacute; declar&eacute; &agrave; la CNIL N&deg;1219421 </b></font></div></td>
    </tr>
    </table>
     
     
    </body>
    </html>

    j'ai egalement rajouter cetaine chose qui se trouver dans index.php, etand donné que dans index.php tout marcher niquel, j'ai mit le haut du script de index.php le meme dans modules.php et cela a fonctionnai, je pense une mauvaise ouverture de la session

  5. #25
    Membre éprouvé
    Homme Profil pro
    Conseil - Consultant en systèmes d'information
    Inscrit en
    Juin 2003
    Messages
    909
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Suisse

    Informations professionnelles :
    Activité : Conseil - Consultant en systèmes d'information
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2003
    Messages : 909
    Points : 1 014
    Points
    1 014
    Par défaut un conseil de sécurité
    Je te conseille d'éviter d'utiliser <? en ouverture de balise et d'utiliser <?php ceci pour une question de sécurité

  6. #26
    Membre habitué
    Inscrit en
    Janvier 2007
    Messages
    437
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 437
    Points : 184
    Points
    184
    Par défaut
    Apparent toutes les pages sont avec (<?) et cela fonctionne

  7. #27
    Membre éprouvé
    Homme Profil pro
    Conseil - Consultant en systèmes d'information
    Inscrit en
    Juin 2003
    Messages
    909
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Suisse

    Informations professionnelles :
    Activité : Conseil - Consultant en systèmes d'information
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2003
    Messages : 909
    Points : 1 014
    Points
    1 014
    Par défaut oui ça fonctionne
    Citation Envoyé par toulousain3117
    Apparent toutes les pages sont avec (<?) et cela fonctionne
    Je n'ai jamais dit que cela ne fonctionnait pas, j'ai dit que c'était une question de sécurité. Et en plus, à confirmer, PHP6 ne supportera plus les short_open_tags. Donc pour faciliter une migration future de tes applications vers la version 6 de PHP, je te conseille d'utiliser <?php.

+ Répondre à la discussion
Cette discussion est résolue.
Page 2 sur 2 PremièrePremière 12

Discussions similaires

  1. Sécurite: Problème sur mes Index.php
    Par moonwar dans le forum Sécurité
    Réponses: 2
    Dernier message: 17/11/2008, 21h27
  2. [Sécurité] Question sur les sessions
    Par Seth77 dans le forum Langage
    Réponses: 20
    Dernier message: 25/01/2006, 12h34
  3. Problème sur classe Transformer avec les <!--
    Par tykool dans le forum Format d'échange (XML, JSON...)
    Réponses: 1
    Dernier message: 10/01/2006, 10h20
  4. Réponses: 2
    Dernier message: 21/09/2005, 12h18

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo