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 :

Erreur à l'utilisation de "session_start" [Fait]


Sujet :

Langage PHP

  1. #1
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut Erreur à l'utilisation de "session_start"
    Bonjour,
    j'ai une erreur sur toute mes page qui ont les fichier verif.php en include:
    L'erreur est :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/prestataire/opendcf/include/verif.php:1) in /www/prestataire/opendcf/include/verif.php on line 3
    Le code de la page verfi.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
     
    <?php // $Id: verif.php 234 2008-07-06 21:49:31Z pcoustillas $ ?>
    <?php
    session_start();
    ini_set('session.save_path', dirname(__FILE__) . '/../sessions');
     
    require_once (dirname(__FILE__) . '/debug.php'); //inclu par verif car verif est inclus presque partout.
    //trigger_error($_SERVER['REQUEST_URI']);
     
     
     
    //$authent_ok=isset($_SESSION['admin'])?"OK":"KO";
    if(!isset($_SESSION['admin']))
    {
      //echo "Vous n'êtes pas autorisé à accéder à cette zone";
      header("Location: index.php?admin=oui");
      exit;
    } else {
     
      $lang = $_SESSION['lang']; 
      $user_num = $_SESSION['num'];
      $user_nom = $_SESSION["nom"];
      $user_prenom = $_SESSION["prenom"];
      $user_email = $_SESSION['email'];
      $user_fact = $_SESSION['fact'];
      $user_com = $_SESSION['com'];
      $user_dev = $_SESSION['dev'];
      $user_admin = $_SESSION['admin'];
      $user_dep = $_SESSION['dep'];
      $user_stat = $_SESSION['stat'];
      $user_art = $_SESSION['art'];
      $user_cli = $_SESSION['cli'];
     
    }
     
    ?>
    Merci d'avance pour vos réponses

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155

  3. #3
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Oui j'ai deja regarder mais je ne trouve pas d'erreur.
    Pourrait tu me corriger le script de verif.php stp
    Merci
    PS: merci pour le rapidité . Sa fait 2 jour que j'attend une réponse sur un autre forum (je ne siterait pas de nom) lol

  4. #4
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Le chemin de session doit etre modifié avant d'appeller la session :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <?php
    session_save_path(dirname(__FILE__) . '/../sessions'));
    session_start();
    Enleve egalement ta premiere ligne car c'est apparemment a ce niveau qu'il y a un probleme.

  5. #5
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Bonjour,
    le problème persiste toujours le même message d'erreur.
    Le code de ma verif.php est maintenant :
    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
    <?php
    session_save_path(dirname(__FILE__) . '/../sessions'));
    session_start();
     
    require_once (dirname(__FILE__) . '/debug.php'); //inclu par verif car verif est inclus presque partout.
    //trigger_error($_SERVER['REQUEST_URI']);
     
     
     
    //$authent_ok=isset($_SESSION['admin'])?"OK":"KO";
    if(!isset($_SESSION['admin']))
    {
    	//echo "Vous n'êtes pas autorisé à accéder à cette zone";
    	header("Location: index.php?admin=oui");
    	exit;
    } else {
     
    	$lang = $_SESSION['lang'];	
    	$user_num = $_SESSION['num'];
    	$user_nom = $_SESSION["nom"];
    	$user_prenom = $_SESSION["prenom"];
    	$user_email = $_SESSION['email'];
    	$user_fact = $_SESSION['fact'];
    	$user_com = $_SESSION['com'];
    	$user_dev = $_SESSION['dev'];
    	$user_admin = $_SESSION['admin'];
    	$user_dep = $_SESSION['dep'];
    	$user_stat = $_SESSION['stat'];
    	$user_art = $_SESSION['art'];
    	$user_cli = $_SESSION['cli'];
     
    }
     
    ?>

  6. #6
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Qu'est ce qu'il met maintenant comme numeros de lignes ?

    Si ton fichier est en UTF8 , verifie qu'il est sans BOM (tu peux le voir avec notepad++)

  7. #7
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Re,
    J'ai 2 erreur maintenant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/prestataire/opendcf/bon_lister.php:1) in /www/prestataire/opendcf/include/verif.php on line 3
     
    Warning: Cannot modify header information - headers already sent by (output started at /www/prestataire/opendcf/bon_lister.php:1) in /www/prestataire/opendcf/include/verif.php on line 14
    Que faire ???

  8. #8
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Tu n'as pas repondu a ma question sur le BOM

  9. #9
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Oui ,
    il est en UTF8 sans BOM
    que faire ???

  10. #10
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Ré-ecris le début de ton fichier et essaie de copier-coller dans un fichier neuf.

  11. #11
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Re,
    toujours le même problème :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/prestataire/opendcf/bon_lister.php:1) in /www/prestataire/opendcf/include/verif.php on line 3

  12. #12
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    ah pardon c'est dans le fichier bonlister.php ligne 1 que le probleme se situe

  13. #13
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Re,
    Voici le code de la page bon_lister.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
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    <?php   // $Id: bon_lister.php 288 2008-09-20 09:35:54Z pcoustillas $ ?>
    <?php
    require_once("include/verif.php");
    require_once("include/config/common.php");
    require_once("include/config/var.php");
    require_once("include/language/$lang.php");
    require_once("include/utils.php");
    require_once("include/headers.php");
    ?>
     
    <script type="text/javascript" src="javascripts/confdel.js"></script>
    <script type="text/javascript" src="javascripts/tri_formulaire.js"></script>
    <script language="javascript" src="javascripts/verifier_form.js" type="text/javascript"></script>
    <script type="text/javascript">
    	function verif_creer_bon()
    	{
    		if (verifier('formu','black','date','vide#date_','num_client','egale_a%0'))
    		{
    			document.formu.submit();
    		} else {
    			alert("<?php aff_lang('Une des valeurs saisie n\'est pas correct.\nMerci de corriger avant de poursuivre.') ?>")	
    		}
     
    	}
    </script>
     
    <?php
    require_once("include/combo_annee.php");
    ?>
     
     
     
    <table class="page" align="center">
    	<tr>
    		<td class="page" align="center">
    			<?php
    			require_once("include/head.php");
    			?>
    		</td>
    	</tr>
    	<tr>
    		<td class="page" align="center">
     
    			<?php
    			if ($user_com == "n") {
    				echo"<h1>$lang_commande_droit</h1>";
    				exit;
    			}
     
    			if (isset($_GET['message']))
    			{
    				echo "<h1>" . stripslashes($_GET['message']) . "</h1>";
    			}
     
    			$jour = date("d");
    			$mois = date("n"); //ne doit pas utiliser m car si zero devant le mois marche pas ou mal pour lire le tableau $calendrier
    			$annee = date("Y");
    			//pour le formulaire
    			$mois_1=isset($_POST['mois_1'])?$_POST['mois_1']:$mois;
    			$annee_1=isset($_POST['annee_1'])?$_POST['annee_1']:$annee;
    			//$tri_ordre=isset($_POST['tri_ordre'])?$_POST['tri_ordre']:"ASC"; //ordre de tri
    			//$tri_champ=isset($_POST['tri_champ'])?$_POST['tri_champ']:"date"; // champ de tri
     
     
    			$sql = "SELECT mail, login, num_client, num_bon, tot_htva, tot_tva, nom, num_facture,
    			date,(tot_htva + tot_tva) as ttc
    					FROM ${tblpref}bon_comm
    					RIGHT JOIN ${tblpref}client on ${tblpref}bon_comm.client_num = num_client ";
     
     
    			// ----------  DEBUT DE GESTION DES FILTRES ---------------------
    			if (isset($_GET['annuler_filtre'])) //vidage des filtres si demand鍊			{
    				$_SESSION['filtre_bon_client'] = "";
    				$_SESSION['filtre_bon_num'] = "";
    				$_SESSION['filtre_bon_date'] = "";
    				$_SESSION['filtre_bon_HT'] = "";
    				$_SESSION['filtre_bon_TTC'] = "";
    				$_SESSION['filtre_a_facturer'] = "1"; // 1 ou ""
    				$_SESSION['filtre_deja_facture'] = "";
    			}
     
    			$filtre=" WHERE num_bon > 0 AND ";
     
    			if (isset($_GET['filtrer']))
    			{
    				// MAJ des variables de session de filtre si il y a eu demande de filtrage
    				if (isset($_GET['filtre_bon_client']) && $_GET['filtre_bon_client']<>0 )
    					$_SESSION['filtre_bon_client']=$_GET['filtre_bon_client'];
    				if (isset($_GET['filtre_bon_client']) && $_GET['filtre_bon_client']==0 )
    					unset($_SESSION['filtre_bon_client']);
    				if (isset($_GET['filtre_bon_num']))
    					$_SESSION['filtre_bon_num']=$_GET['filtre_bon_num'];
    				if (isset($_GET['filtre_bon_date']))
    					$_SESSION['filtre_bon_date']=$_GET['filtre_bon_date'];
    				if (isset($_GET['filtre_bon_HT']))
    					$_SESSION['filtre_bon_HT']=$_GET['filtre_bon_HT'];
    				if (isset($_GET['filtre_bon_TTC']))
    					$_SESSION['filtre_bon_TTC']=$_GET['filtre_bon_TTC'];
    				if (isset($_GET['filtre_a_facturer']))
    				{
    					$_SESSION['filtre_a_facturer']=$_GET['filtre_a_facturer'];
    				} else {
    					$_SESSION['filtre_a_facturer']="";
    				}
    				if (isset($_GET['filtre_deja_facture']))
    				{
    					$_SESSION['filtre_deja_facture']=$_GET['filtre_deja_facture'];
    				} else {
    					$_SESSION['filtre_deja_facture']="";
    				}
    			}
     
    			//if ( ! isset($_GET['annuler_filtre']) && ! isset($_GET['filtrer']) && ! isset($_SESSION['filtre_bon_date']))
     
     
    			//Crꢴion de la requete. Ne se trouve pas dans le test "Si frm poster" car si le user revient le filtre doit tj etre en place
    			if (isset($_SESSION['filtre_bon_client']) && $_SESSION['filtre_bon_client'] != "" )
    			{
    				$filtre .= "num_client="  . $_SESSION['filtre_bon_client'] . " AND ";
    			}
    			if (isset($_SESSION['filtre_bon_num']) && $_SESSION['filtre_bon_num'] != "")
    			{
    				$filtre .= "num_bon" . saisie_to_sql($_SESSION['filtre_bon_num'],"num") . " AND ";
    			}
    			if (isset($_SESSION['filtre_bon_date']) && $_SESSION['filtre_bon_date'] != "")
    			{
    				$filtre .= "date" . saisie_to_sql($_SESSION['filtre_bon_date'],"date") . " AND ";
    			}
    			if (isset($_SESSION['filtre_bon_HT']) &&$_SESSION['filtre_bon_HT'] != "")
    			{
    				$filtre .= "tot_htva" . saisie_to_sql($_SESSION['filtre_bon_HT'],"num") . " AND ";
    			}
    			if (isset($_SESSION['filtre_bon_TTC']) && $_SESSION['filtre_bon_TTC'] != "")
    			{
    				$filtre .= "tot_tva" . saisie_to_sql($_SESSION['filtre_bon_TTC'],"num") . " AND ";
    			}
    			if (!isset($_SESSION['filtre_deja_facture']) || $_SESSION['filtre_deja_facture'] == "")
    			{
    				$filtre .= "num_facture = 0 AND ";
    			}
    			if (!isset($_SESSION['filtre_a_facturer']) || $_SESSION['filtre_a_facturer'] == "")
    			{
    				$filtre .= "num_facture != 0 AND ";
    			}
     
    			$filtre = substr($filtre,0,strlen($filtre) -5); //retirer " AND " de la fin du filtre
    			$sql .= " $filtre ";
     
     
     
    			//echo $sql;
     
    			// ----------------  FIN DE GESTION DES FILTRES  -----------------------------
     
    			$tri_ordre=isset($_GET['tri_ordre'])?$_GET['tri_ordre']:"ASC"; //ordre de tri
    			$tri_champ=isset($_GET['tri_champ'])?$_GET['tri_champ']:"date"; // champ de tri
     
             $sql .= " ORDER BY " . $tri_champ . " " . $tri_ordre;
     
    			$req = mysql_query($sql) or die("Erreur SQL !<br/>$sql<br/>" . mysql_error());
     
     
    			?>
    			<center>
    				<?php //affichage des 2 tableaux du hauts ?>
    				<table class="boiteaction" width="80%">
    					<tr>
    						<td width="45%">
    							<form name="formu" method="get" action="bon_edit.php" onsubmit="return verif_formulaire()">
    							<input type="hidden" name="nouv" value="ok" />
    							<?php //tableau permettant de crꦲ un bon de commande ?>
    							<center>
    							<table width="90%">
    								<caption><?php echo "$lang_cre_bon"; ?></caption>
    								<tr>
    									<td class="texte0" id="num_client"><?php echo "$lang_client";?> </td>
    									<td class="texte0">
    										<?php require_once("include/choix_cli.php");
    										inclure_combo_client("num_client",0,"formu");
    										?>
    									</td>
    								</tr>
    								<tr>
    									<td class="texte0" id="date"><?php aff_lang("Date") ?> </td>
    									<td class="texte0">
    										<input type="text" name="date" value="<?php echo "$jour/" . date("m") . "/$annee" ?>" />
    										<a href="#" onclick="window.open('include/pop.calendrier.php?frm=formu&amp;ch=date','calendrier','width=415,height=190,left=200,top=200,scrollbars=0').focus();">
    											<img src="image/petit_calendrier.gif" alt="calendrier" border="0"/>
    										</a>
    									</td>
    								</tr>
    								<tr>
    									<td class="submit" colspan="2">
    										<input type="button" onclick="verif_creer_bon()" name="Submit" value="<?php echo "$lang_crer_bon" ?>" />
    									</td>
    								</tr>
    								<tr>
    									<td><br/><br/><?php bouton_aide("bon") ?></td></tr>
    							</table>
    							</center>
    							</form>
    						</td>
    						<td width="5%">&nbsp;</td>
    						<td width="50%">
    							<?php //tableau de filtre ?>
    							<form action="bon_lister.php" method="get" name="frm_cde">
    								<input type="hidden" name="tri_champ" value="<?php echo $tri_champ ?>" />
    								<input type="hidden" name="tri_ordre" value="<?php echo $tri_ordre ?>" />
    								<input type="hidden" name="filtrer"/>
    								<table width="90%">
    									<caption><?php aff_lang("Filtre") ?></caption>
    									<tr>
    										<td class="texte0" width="20%"><?php aff_lang("Bon nТ) ?></td>
    										<td class="texte0" width="30%">
    											<input type="text" name="filtre_bon_num" value="<?php echo isset($_SESSION['filtre_bon_num'])?$_SESSION['filtre_bon_num']:"" ?>" />
    										</td>
    										<td class="submit" rowspan="7" width="20%">
    											<br/><br/>
    											<input type="submit" value="Filtrer !"/>
    											<br/><br/>
    											<a href="bon_lister.php?annuler_filtre=oui"><img border="0" src="image/delete.png" alt="<?php echo $lang_supprimer; ?>" /></a>
    											<br/><br/>
    											<?php bouton_aide("filtre") ?>
    										</td>
    									</tr>
    									<tr>
    										<td class="texte0"><?php aff_lang("Client") ?></td>
    										<td class="texte0">
    											<?php inclure_combo_client("filtre_bon_client",isset($_SESSION['filtre_bon_client'])?$_SESSION['filtre_bon_client']:"","frm_cde") ?>
    										</td>
    									</tr>
    									<tr>
    										<td class="texte0"><?php aff_lang("Date") ?></td>
    										<td class="texte0">
    											<input type="text" size="14" name="filtre_bon_date" value="<?php echo isset($_SESSION['filtre_bon_date'])?$_SESSION['filtre_bon_date']:"" ?>" />
    											<a href="#" onclick="window.open('include/pop.calendrier.php?frm=frm_cde&amp;ch=filtre_bon_date','calendrier','width=415,height=190,left=200,top=200,scrollbars=0').focus();">
    												<img src="image/petit_calendrier.gif" alt="calendrier" border="0"/>
    											</a>
    										</td>
    									</tr>
    									<tr>
    										<td class="texte0"><?php echo $lang_total_h_tva; ?></td>
    										<td class="texte0">
    											<input type="text" name="filtre_bon_HT" value="<?php echo isset($_SESSION['filtre_bon_HT'])?$_SESSION['filtre_bon_HT']:"" ?>" />
    										</td>
    									</tr>
    									<tr>
    										<td class="texte0"><?php echo $lang_total_ttc; ?></td>
    										<td class="texte0">
    											<input type="text" name="filtre_bon_TTC" value="<?php echo isset($_SESSION['filtre_bon_TTC'])?$_SESSION['filtre_bon_TTC']:"" ?>" />
    										</td>
    									</tr>
    									<tr>
    										<td class="texte0" colspan="2">
    											<?php aff_lang("A facturer") ?> 
    													<input type="checkbox" value="1" name="filtre_a_facturer" <?php if (isset($_SESSION['filtre_a_facturer']) && $_SESSION['filtre_a_facturer'] != "") { echo 'checked="checked"' ;} ?> /> &nbsp; 
    											<?php aff_lang("Dꫠ factur颩 ?>
    													<input type="checkbox" value="1" name="filtre_deja_facture" <?php if (isset($_SESSION['filtre_deja_facture']) && $_SESSION['filtre_deja_facture'] != "") { echo 'checked="checked"' ;} ?> /> &nbsp; 
    										</td>
    									</tr>
    								</table>
    							</form>
     
    						</td>
    					</tr>
    				</table>
    				<br/>
     
    				<br/>
     
    				<?php //Afficher la liste des commandes ?>
    				<table class="boiteaction">
    					<tr>
    						<th width="30"><a href="javascript:ecrit_ordre_et_post('frm_cde','num_bon')">Nм/a></th>
    						<th width="180"><a href="javascript:ecrit_ordre_et_post('frm_cde','nom')"><?php echo $lang_client; ?></a></th>
    						<th width="90"><a href="javascript:ecrit_ordre_et_post('frm_cde','date')"><?php echo $lang_date; ?></a></th>
    						<th width="90"><a href="javascript:ecrit_ordre_et_post('frm_cde','tot_htva')"><?php  aff_lang("Total HT")  ?></a></th>
    						<th width="90"><a href="javascript:ecrit_ordre_et_post('frm_cde','ttc')"><?php  aff_lang("Total TTC")  ?></a></th>
    						<th colspan="6"><?php echo $lang_action; ?>  &nbsp; <?php bouton_aide("bon_icones") ?></th>
    					</tr>
          			<?php
    					$nombre = 1;
    					$total_ht=0;
    					$total_ttc=0;
    					while($data = mysql_fetch_array($req))
    					{
    						$num_bon = $data['num_bon'];
    						$total = $data['tot_htva'];
    						$tva = $data["tot_tva"];
    						$date = sql_to_date($data["date"]);
    						$nom = $data['nom'];
    						$nom = htmlentities($nom, ENT_QUOTES,'UTF-8');
    						$nom_html = htmlentities (urlencode ($nom));
    						$num_client = $data['num_client'];
    						$mail = $data['mail'];
    						$login = $data['login'];
    						$ttc = $data['ttc'];
    						$nombre = $nombre +1;
    						$num_facture = $data['num_facture'];
    						if($nombre & 1) {
    							$line=0;
    						} else {
    							$line=1;
    						}
    						$total_ht = $total_ht + $total;
    						$total_ttc = $total_ttc + $ttc;
     
    					?>
    					<tr class="texte<?php echo $line ?>" onmouseover="this.className='highlight'" onmouseout="this.className='texte<?php echo "$line" ?>'">
    						<td class="highlight"><?php echo "$num_bon"; ?></td>
    						<td class="highlight"><?php echo "$nom"; ?></td>
    						<td class="highlight"><?php echo "$date"; ?></td>
    						<td class="highlight" style="text-align:right"><?php echo montant_financier($total); ?>&nbsp;</td>
    						<td class="highlight" style="text-align:right"><?php echo montant_financier($ttc); ?>&nbsp;</td>
    						<td class="highlight">
    							<a href='bon_edit.php?num_bon=<?php echo "$num_bon"; ?>'>
    								<img border="0" alt="editer" src="image/edit.png" />
    							</a>
    						</td>
    						<?php
    						if ($num_facture == "0")
    						{
    						?>
    						<td class="highlight">
    							<a href='bon_delete.php?num_bon=<?php echo $num_bon; ?>&amp;nom=<?php echo "$nom_html"; ?>' 
    								onclick="return confirmDelete('<?php echo"$lang_con_effa $num_bon"; ?>')"><img border="0" src="image/delete.png" alt="delete" /></a>
    						</td>
    						<?php
    						} else {
    						?>
    						<td class="highlight">&nbsp;</td>
    						<?php
    						}
    						?>
    						<td class="highlight">
    							<form action="fpdf/bon_pdf.php" method="post" target="_blank" >
    								<input type="hidden" name="num_bon" value="<?php echo "$num_bon"; ?>" />
    								<input type="hidden" name="nom" value="<?php echo "$nom_html"; ?>" />
    								<input type="hidden" name="user" value="adm" />
    								<input type="image" src="image/imprimante.png" alt="imprimer" />
    							</form>
    						</td>
    						<?php
    						if ($mail != '' and $login !='') { ?>
    							<td class="highlight">
    								<a href='notifi_cli.php?type=comm&amp;mail=<?php echo"$mail"; ?>'>
    									<img src='image/mail.gif' border='0' alt='mail' onclick="return confirmDelete('<?php echo "$lang_con_env_notif $num_bon"; ?>')" />
    								</a>
    							</td>
    						<?php
    						} else {
    							?>
    							<td class="highlight">&nbsp;</td>
    							<?php
    						}
    						if ($mail != '' ) {
    						?>
    						<td class="highlight">
    							<form action="fpdf/bon_pdf.php" method="post" onclick="return confirmDelete('<?php echo "$lang_con_env_pdf $num_bon"; ?>')">
    								<input type="hidden" name="num_bon" value="<?php echo $num_bon; ?>" />
    								<input type="hidden" name="nom" value="<?php echo $nom; ?>" />
    								<input type="hidden" name="user" value="adm" />
    								<input type="hidden" name="ext" value=".pdf" />
    								<input type="hidden" name="mail" value="y" />
    								<input type="image" src="image/pdf.gif" alt="mail" />
    							</form>
    						</td>
    						<?php
    						} else {
    							?>
    							<td class="highlight">&nbsp;</td>
    							<?php
    						}
    						?>
    						<td class="highlight">
    							<?php
    							if ($num_facture == "0")
    							{
    								//il faut ajouter le num client afin de pouvoir ajouter sur l'ecran suivant d'autre bon de ce client
    								echo "<a href='fact_bon_orph.php?num=$num_bon&amp;client=$num_client'>" . get_lang("Facturer ce bon") . "</a>";
    							} else {
    								//proposer d'afficher la facture qui contient ce bon
    								echo "<a href='fact_edit.php?num_fact=$num_facture'>" . get_lang("Voir la facture nТ) . "$num_facture";
    							}
    							?>
    						</td>
    					</tr>
    					<?php
    					} //fin while ?>
     
    					<tr>
    						<td colspan="3">&nbsp;</td>
    						<td colspan="2"> <hr/></td>
    						<td colspan="6">&nbsp;</td>
    					</tr>
     
     
    					<tr>
    						<td colspan="2">&nbsp;</td>
    						<td style="text-align:center">TOTAL</td>
    						<td style="text-align:right"><?php echo montant_financier($total_ht) ?>&nbsp; </td>
    						<td style="text-align:right"><?php echo montant_financier($total_ttc) ?>&nbsp; </td>
    						<td colspan="6">&nbsp;</td>
    					</tr>
    				</table>
    			</center>
    		</td>
    	</tr>
    	<tr>
    		<td>
    			<?php
    			require_once("include/bas.php");
    			?>
    		</td>
    	</tr>
     
    </table>
    </body>
    </html>
    PS: si j'enlève la première ligne tout beug

  14. #14
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    tu peux etre plus précis que "tout beug" ?

  15. #15
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Alors , en faite je travail avec Opendcf (facturier) je l'ai réinstaller et tout marche (plus de problème de session_start ni rien...) . Quand on creer un client sur Opendcf un mail est envoyé au client avec ses identifiant pour pouvoir se connecté a sa zone . Le message est : Vos identifiant a Opendcf sont : .
    Et quand je change le Opendcf en Evici ce message apparait :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/prestataire/opendcf/client_creer.php:1) in /www/prestataire/opendcf/include/verif.php on line 9
     
    Warning: Cannot modify header information - headers already sent by (output started at /www/prestataire/opendcf/client_creer.php:1) in /www/prestataire/opendcf/client_creer.php on line 84
    Je vous mets le code de verif.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
    <?php   // $id: verif.php 234 2008-07-06 21:49:31z pcoustillas $ ?>
    <?php
    ini_set('session.save_path', dirname(__FILE__) . '/../sessions');
     
    require_once (dirname(__FILE__) . '/debug.php'); //inclu par verif car verif est inclus presque partout.
    //trigger_error($_SERVER['REQUEST_URI']);
     
     
    session_start();
     
    //$authent_ok=isset($_SESSION['admin'])?"OK":"KO";
    if(!isset($_SESSION['admin']))
    {
    	//echo "Vous n'êtes pas autorisé à accéder à cette zone";
    	header("Location: index.php?admin=oui");
    	exit;
    } else {
     
    	$lang = $_SESSION['lang'];	
    	$user_num = $_SESSION['num'];
    	$user_nom = $_SESSION["nom"];
    	$user_prenom = $_SESSION["prenom"];
    	$user_email = $_SESSION['email'];
    	$user_fact = $_SESSION['fact'];
    	$user_com = $_SESSION['com'];
    	$user_dev = $_SESSION['dev'];
    	$user_admin = $_SESSION['admin'];
    	$user_dep = $_SESSION['dep'];
    	$user_stat = $_SESSION['stat'];
    	$user_art = $_SESSION['art'];
    	$user_cli = $_SESSION['cli'];
     
    }
     
    ?>
    Et le code de client_creer.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
    <?php   // $Id: client_creer.php 227 2008-07-01 20:08:50Z pcoustillas $ ?>
    <?php
    /*Copyright (C) 2003-2004 Guy Hendrickx
    Licensed under the terms of the GNU  General Public License:http://www.opensource.org/licenses/gpl-license.php
    File Authors:Guy Hendrickx 
    Modification : Pierre Coustillas */
    require_once("include/verif.php");
    require_once("include/config/common.php");
    require_once("include/language/$lang.php");
    require_once("include/config/var.php");
     
     
    $nom=isset($_POST['nom'])?$_POST['nom']:"";
    $nom_sup=isset($_POST['nom_sup'])?$_POST['nom_sup']:"";
    $rue=isset($_POST['rue'])?$_POST['rue']:"";
    $ville=isset($_POST['ville'])?$_POST['ville']:"";
    $code_post=isset($_POST['code_post'])?$_POST['code_post']:"";
    $num_tva=isset($_POST['num_tva'])?$_POST['num_tva']:"";
    $login=isset($_POST['login'])?$_POST['login']:"";
    $pass=isset($_POST['pass'])?$_POST['pass']:"";
    $mail=isset($_POST['mail'])?$_POST['mail']:"";
    $civ=isset($_POST['civ'])?$_POST['civ']:"";
    $tel=isset($_POST['tel'])?$_POST['tel']:"";
    $fax=isset($_POST['fax'])?$_POST['fax']:"";
     
     
    if($nom=='')
    {
    	$message= $lang_oubli_champ;
        header ("Location: client_lister.php?message=$message");
        exit;
    }
     
    $pass_crypt = md5($pass);
     
     
     
    $sql1 = "INSERT INTO ${tblpref}client(nom, nom2, rue, ville, cp, num_tva, mail, civ, tel, fax, login, pass) VALUES 
    			('$nom', '$nom_sup', '$rue', '$ville', '$code_post', '$num_tva', '$mail', '$civ', '$tel', '$fax','$login','$pass_crypt')";
    mysql_query($sql1) or die("Erreur SQL !<br/>$sql1<br/>" . mysql_error());
     
    if ($login !='') 
    {
    	$sql = "SELECT count(*) FROM ${tblpref}client WHERE login = '$login'";
    	$result = mysql_query($sql) or die("Erreur selection clientSQL !<br/>$sql<br/>" . mysql_error());
    	$nb_login = mysql_result($result,0);
     
    	if ($nb_login > 1) 
    {//supérieur à 1 vu qu'on vient de le créer
    		//récupérer le numéro du dernier client 
    		$sql="SELECT max(num_client) FROM ${tblpref}client";
    		$result=mysql_query($sql);
    		$num_cli=mysql_result($result,0);
        	header("Location: client_edit.php?num=$num_cli&message=Création du client avec succès, mais le login choisi existe déjà");
        	exit;
    }
    }
     
    if ($login!='' && $pass !='' && $mail !='') 
    {
    	$sql_mail = "SELECT email FROM ${tblpref}user WHERE num=1";
    	$result=mysql_query($sql_mail);
    	$mail_admin = mysql_result($result,0);
     
    	$to = "$mail";
    	$from = "$mail_admin" ;
    	$subject = "Creation de votre mot de passe" ;
    	$message_mail =  "Bonjour,<br/>
    		Vos identifiants de connexion à OPENDCF ont été créés.<br/>
    		<b>Login : $login <br/>
    		<b>Mot de passe : $pass<br/>
    		Bonne journée.";
    	$header = 'From: '.$from."\n"
    	 .'MIME-Version: 1.0'."\n"
    	 .'Content-Type: text/html; charset= ISO-8859-15'."\n"
    	 .'Content-Transfer-Encoding: 8bit'."\n\n";
     
    	mail($to,$subject,utf8_decode($message_mail),$header);
     
    	header ("Location: client_lister.php?message=Client créé avec succès, et identifiants de connexion envoyé au client.");
    	exit;
    }
     
    header ("Location: client_lister.php?message=Client créé avec succès.");
    ?>
    Merci d'avance .....

  16. #16
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Le probleme est sur la ligne 1 de client_creer.php

  17. #17
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    Je ne vois pas ou est le problème.

  18. #18
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Les vérifications sont toujours les mêmes : présence d'espaces, de lignes vides, fichier avec BOM etc.

  19. #19
    Membre du Club Avatar de worldhugo
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    139
    Détails du profil
    Informations personnelles :
    Localisation : France, Marne (Champagne Ardenne)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 139
    Points : 54
    Points
    54
    Par défaut
    J'ai déja tout vérifier.
    Je te mets les fichiers en pièces jointes pour que tu jette un coup d'oeuil....
    Fichiers attachés Fichiers attachés

  20. #20
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    ton fichier client_creer.php a un BOM

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Réponses: 3
    Dernier message: 27/11/2006, 18h00

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