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 :

Récupération de la valeur d'un champ "bug" [PHP 5.2]


Sujet :

Langage PHP

  1. #1
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut Récupération de la valeur d'un champ "bug"
    Bonjour,

    Je me heurte à un problème curieux. Dans mon formulaire j'ai un champ de ce type :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <input id="id_pouet" type="hidden" name="id_pouet" value="3f40b84bea68d" />

    Quand je récupère le contenu de $_POST et que je fais un var_dump, j'ai ceci :
    ... ["id_pouet"]=> int(3) ...
    Savez-vous pourquoi il ne me retrouve pas tout le contenu du champ ?
    et pourquoi il ne le considère pas comme un string ?

    Merci !


    -----

    Je précise qu'en local sur un PHP v5.3.? je ne constate pas ce problème et que là il s'agit d'un hébergement mutualisé qui utilise soit du PHP v4.4.9 soit v52.17

  2. #2
    Expert confirmé
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 368
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 368
    Billets dans le blog
    17
    Par défaut
    Probablement un traitement quelconque effectué sur ton formulaire (JavaScript ?) ou ton $_POST (filtrage, etc.).
    Tu laisses entendre qu'il y aurait peut-être un bug PHP4, as-tu reproduit le défaut avec un formulaire tout simple ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    <?php
     
    if ( isset($_POST['foo']) ) {
        var_dump($_POST) ;
    }
     
    ?>
    <form method="post">
        <input type="hidden" name="foo" value="3f40b84bea68d">
        <input type="submit">
    </form>

  3. #3
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut
    Merci pour ton aide.

    J'ai fait en sorte d'être en 5.2.17 et il n'y a pas de bug de PHP, ton exemple marche parfaitement.

    D'ailleurs j'ai le même champ qui existe en old_id_pouet et pour lequel je récupère bien la valeur.

    Du coup je ne vois pas du tout ce qui parasite l'accès à cette variable, ça fonctionne pour 95 variables de mon formulaire mais pas pour 2.

    D'ailleurs qu'est-ce qui peut expliquer qu'il stop la lecture de la valeur aux premiers chiffres ?
    en appelant $_POST["id_pouet"], peut-on forcer le retour au format texte ?

  4. #4
    Expert confirmé
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 368
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 368
    Billets dans le blog
    17
    Par défaut
    Du coup je ne vois pas du tout ce qui parasite l'accès à cette variable, ça fonctionne pour 95 variables de mon formulaire mais pas pour 2.
    Les 2 dernières présentées dans le formulaire ?


    D'ailleurs qu'est-ce qui peut expliquer qu'il stop la lecture de la valeur aux premiers chiffres ?
    Pour les 2 qui posent problème ?

    en appelant $_POST["id_pouet"], peut-on forcer le retour au format texte ?
    Les champs d'un formulaire sont toujours traités par PHP comme du texte, par exemple mon script pus haut donne array(1) { ["foo"]=> string(13) "3f40b84bea68d" }

    Si tu obtiens ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ... ["id_pouet"]=> int(3) ...
    ... c'est que tu as quelque chose en amont qui essaie de transformer le champ en numérique. Va falloir tracer l'exécution de ton script.

  5. #5
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut
    Citation Envoyé par Séb. Voir le message
    Les 2 dernières présentées dans le formulaire ?
    Non, au milieu à peu près

    Citation Envoyé par Séb. Voir le message
    Pour les 2 qui posent problème ?
    Oui, je n'ai pas noté de problème avec les autres champs

    Citation Envoyé par Séb. Voir le message
    ... c'est que tu as quelque chose en amont qui essaie de transformer le champ en numérique. Va falloir tracer l'exécution de ton script.
    J'ai tracé que dans ma page html le code semble ok, mais en appel de mon script php (après clique sur le submit) je ne récupère que des int(x).

    Ce que je ne comprend pas c'est que je n'ai pas ce problème en local (php v5.3.x) avec les mêmes fichiers et une même structure de base.

    Il me reste comme hypothèse :
    soit un paramétrage différent du serveur PHP ?
    soit un filtrage de l'hébergeur mais ça me semblerait très surprenant ?

    Est-ce que ça peut être lié à un problème d'encodage de caractère ? les accents dans mes données n'ont pas le même affichage. Mais même comme ça je ne vois pas le rapport avec ce comportement.

  6. #6
    Expert confirmé
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 368
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 368
    Billets dans le blog
    17
    Par défaut
    J'ai tracé que dans ma page html le code semble ok, mais en appel de mon script php (après clique sur le submit) je ne récupère que des int(x).
    Et chez ton hébergeur le formulaire que j'ai donné en exemple donne aussi des ints plutôt que des strings ?

  7. #7
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut
    Non ça restitue la string.

    Je veux bien croire que j'ai merdé quelque part mais dans mon html la valeur est ok, dès que j'arrive dans mon code var_dump($_POST); me prouve que la valeur est tronquée. Et ça uniquement chez l'hébergeur.

  8. #8
    Expert confirmé
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 368
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 368
    Billets dans le blog
    17
    Par défaut
    Va falloir saucissonner tes scripts pour isoler le pb.
    Poste-les si tu veux qu'on t'aide.

  9. #9
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut
    Ci-dessous les éléments. J'ai involontairement omis de préciser que j'utilise SPIP et que ma page HTML est appelée par SPIP. Peut-être est-ce que le problème a une origine de ce côté même si je ne vois pas laquelle.

    Voici la page html que j'ai à l'écran (je supprime une partie des infos pour éclaircir). En fin de code on voit la valeur id_pere correct :
    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
     
    				<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    	<head>
    		<title>test</title>
    		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    	</head>
    	<body>
    	<div>
    		<table>    
    			<tr>
    				<td>
    					<SCRIPT language="JavaScript" type="text/javascript" src="./gcr/js/admin.js"></SCRIPT>
    <b>Edition de la fiche d'un chien</b>
    &nbsp;<br>
    &nbsp;<br>
    <form method="post" action="spip.php?page=edit_chien">
    	<input type="hidden" name="form_title" value="Modification/Visualisation du dossier d'un chien" />
    	<input type="hidden" name="id" value="405ae5f5519e4" />
    	<input type="hidden" name="date_cotation" value="00/00/0000" />
    	<input type="hidden" name="old_nom" value="KYLIE" />
    	<input type="hidden" name="old_surnom" value="STRAP" />
    	<input type="hidden" name="old_affixe" value="THE POWER OF DEMONS" />
    	<input type="hidden" name="old_inverse_nom_affixe" value="0" />
    	<input type="hidden" name="old_sexe" value="2" />
    	<input type="hidden" name="old_no_lo" value="1111111111111" />
    	<input type="hidden" name="old_tatouage" value="DDD" />
    	<input type="hidden" name="old_puce" value="" />
    	<input type="hidden" name="old_adn" value="" />
    	<input type="hidden" name="old_cotation" value="0" />
    	<input type="hidden" name="old_affich_dysp" value="1" />
    	<input type="hidden" name="old_dysplasie_hanches" value="" />
    	<input type="hidden" name="old_dysplasie_coudes" value="" />
    	<input type="hidden" name="old_tan" value="" />
    	<input type="hidden" name="old_id_pere" id="old_id_pere" value="3f40b84bea68d" />
    	<input type="hidden" name="old_id_mere" id="old_id_mere" value="0" />
    	<input type="hidden" name="old_id_producteur" value="796" />
    	<input type="hidden" name="old_ix_producteur" value="1" />
    	<input type="hidden" name="old_id_proprietaire" value="276" />
    	<input type="hidden" name="old_ix_proprietaire" value="1" />
    	<input type="hidden" name="old_date_naissance" value="23/02/2001" />
    	<input type="hidden" name="old_nationalite" value="FRANCE" />
    	<input type="hidden" name="old_couleur" value="MASQUE MARRON" />
    	<input type="hidden" name="old_nom_photo" value="" />
    	<input type="hidden" name="old_observations" value="" />
    	<input type="hidden" name="old_cardio_obs" value="test" />
    	<input type="hidden" name="old_coeur_stenose_aorte" value="0" />
    	<input type="hidden" name="old_coeur_stenose_pulmo" value="0" />
    	<input type="hidden" name="old_coeur_cardio_myo" value="0" />
    	<input type="hidden" name="old_date_coeur_cardio_myo" value="" />
    	<input type="hidden" name="old_dispo_saillie" value="0" />
    	<input type="hidden" name="old_date_cotation" value="00/00/0000" />
    	<input type="hidden" name="old_gd_hpk" value="0" />
    	<input type="hidden" name="old_gd_wobbler" value="0" />
    	<input type="hidden" name="old_gd_cardio" value="0" />
    	<input type="hidden" name="old_gd_lipo" value="0" />
    	<input type="hidden" name="old_gd_ppm" value="0" />
    	<input type="hidden" name="old_gd_neph" value="0" />
    	<input type="hidden" name="old_gdu_hpk" value="0" />
    	<input type="hidden" name="old_gdu_wobbler" value="0" />
    	<input type="hidden" name="old_gdu_cardio" value="0" />
    	<input type="hidden" name="old_gdu_lipo" value="0" />
    	<input type="hidden" name="old_gdu_ppm" value="0" />
    	<input type="hidden" name="old_gdu_neph" value="0" />
    	<input type="hidden" name="old_cause_deces" value="0" />
    	<input type="hidden" name="old_date_deces" value="00/00/0000" />
     
    	<input id="select" type="hidden" name="select" value="" />
    	<table cellpadding="0" cellspacing="0" style="border: 1px none #000000;">
    		<tr>
    			<td colspan="2" class="box_title_left">Modification/Visualisation du dossier d'un chien</td>
    		</tr>
    		<tr>
    			<td valign="top" class="box_content_left">
    				<table cellpadding="2" cellspacing="0">
    					<tr>
    						<td align="left"><p>Nom</p></td>
    						<td align="left"><input id="nom" type="text" name="nom" value="KYLIE" size="40" maxlength="60" /></td>
    					</tr>
    					<tr>
    						<td align="left"><p>Surnom</p></td>
    						<td align="left"><input id="surnom" type="text" name="surnom" value="STRAP" size="40" maxlength="60" /></td>
    					</tr>
    					<tr>
    						<td align="left"><p>Affixe</p></td>
    						<td align="left"><input id="affixe" type="text" name="affixe" value="THE POWER OF DEMONS" size="40" maxlength="60" /></td>
    					</tr>
    					<tr>
    						<td align="left"><p>Pr&eacute;senter affixe avant nom</p></td>
    						<td align="left"><input type="checkbox" name="inverse_nom_affixe" /></td>
    					</tr>
    					<tr>
    						<td align="left"><p>Sexe</p></td>
    						<td align="left">
    							<select name="sexe" size="1">
    								<option value="1">M&acirc;le</option><option value="2" selected="1">Femelle</option>							
    							</select>
    						</td>
    					</tr>
    					<tr>
    						<td align="left"><p>Coul. Masque</p></td>
    						<td align="left">
    							<select name="couleur" size="1">
    								<option value="">non renseign&eacute;</option><option value="SANS MASQUE">Sans masque</option><option value="MASQUE MARRON" selected="1">Masque Marron</option><option value="MASQUE NOIR">Masque Noir</option>							</select>
    						</td>
    					</tr>
    					<tr>
    						<td align="left"><p>Date de naissance</p></td>
    						<td align="left">
    							<input type="text" name="date_naissance" value="23/02/2001" size="12" maxlength="10" />
    							<small>format JJ/MM/AAAA</small>
    						</td>
    					</tr>
    					<tr>
    						<td align="left"><p>Date du d&eacute;c&egrave;s</p></td>
    						<td align="left">
    							<input type="text" name="date_deces" value="00/00/0000" size="12" maxlength="10" />
    							<small>format JJ/MM/AAAA</small>
    						</td>
    					</tr>
    					<tr>
    						<td align="left"><p>Nationalit&eacute;</p></td>
    						<td align="left">
    							<select name="nationalite" size="1">
    								<option>ALLEMAGNE</option><option>ARGENTINE</option><option>AUSTRALIE</option><option>AUTRICHE</option><option>BELGIQUE</option><option>BRESIL</option><option>CANADA</option><option>CROATIE</option><option>DANEMARK</option><option>ESPAGNE</option><option>FINLANDE</option><option selected="1">FRANCE</option><option>GRECE</option><option>HONGRIE</option><option>IRLANDE</option><option>ISRAEL</option><option>ITALIE</option><option>LUXEMBOURG</option><option>MEXIQUE</option><option>NORVEGE</option><option>PAYS-BAS</option><option>POLOGNE</option><option>PORTUGAL</option><option>ROYAUME-UNI</option><option>RUSSIE</option><option>SERBIE</option><option>SLOVAQUIE</option><option>SLOVENIE</option><option>SUEDE</option><option>SUISSE</option><option>TCHEQUIE</option><option>USA</option><option>VENEZUELA</option>							</select>
    						</td>
    					</tr>
    					<tr>
    						<td align="left"><p>N&deg; Livre Origines</p></td>
    						<td align="left">
    							<input type="text" name="no_lo" value="1111111111111" size="22" maxlength="20" />
    						</td>
    					</tr>
    					<tr>
    						<td align="left"><p>N&deg; Tatouage</p></td>
    						<td>
    							<input type="text" align="left" name="tatouage" value="DDD" size="22" maxlength="20" />
    						</td>
    					</tr>
    					<tr>
    						<td align="left"><p>N&deg; Puce</p></td>
    						<td>
    							<input type="text" name="no_puce" value="" size="22" maxlength="20" />
    						</td>
    					</tr>
    					<tr>
    						<td valign="top" align="left"><p>P&egrave;re</p></td>
    						<td>
    							<table cellpadding="0" cellspacing="0">
    								<tr>
    									<td align="left">
    										<input id="id_pere" type="hidden" name="id_pere" value="3f40b84bea68d" />
    										<input id="nom_pere" type="text" name="nom_pere" value="CONAN DE ACHTERKRIM" size="40" readonly="1" />
    									</td>
    								</tr>
    								<tr>
    									<td align="right">
    										<button onclick="javascript:window.open('spip.php?page=edit_chien&id=3f40b84bea68d')" class="boutonSADB">Dossier</button>
    										<button onclick="javascript:clear_parent('pere');" class="boutonSADB">Effacer</button>
    										<button onclick="javascript:select_value('pere');" class="boutonSADB">Modifier</button>
    									</td>
    								</tr>
    							</table>
    						</td>
            ...........

    Voici la page PHP qui est appelée lorsque je soumet mon formulaire :

    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
     
    <?php
    	session_start();
    	require(...);
    ?>
    <INCLURE{fond=header2}>
    </div> 
    </div>
     
    <div>
      <table>    
        <tr>
    	<td>
         	  <?php
                      var_dump($_POST);	
                      exit;
     
                   	if ($_SERVER["REQUEST_METHOD"] == "GET")
    		{
    	    	     ...
    		}
    		else if ($_SERVER["REQUEST_METHOD"] == "POST")
    		{
     		     ...
    		}
    	?>
    	</td>
             </tr>
         </table>
        </div>
    </body>
    </html>
    Enfin voici le dump de $_POST (on voit qu'entre la page HTML et l'arrivée dans mon code la valeur id_pere a changé) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    array(97) { ["form_title"]=> string(48) "Modification/Visualisation du dossier d'un chien" ["id"]=> string(13) "405ae5f5519e4" ["date_cotation"]=> string(10) "00/00/0000" ["old_nom"]=> string(5) "KYLIE" ["old_surnom"]=> string(5) "STRAP" ["old_affixe"]=> string(19) "THE POWER OF DEMONS" ["old_inverse_nom_affixe"]=> string(1) "0" ["old_sexe"]=> string(1) "2" ["old_no_lo"]=> string(13) "1111111111111" ["old_tatouage"]=> string(3) "DDD" ["old_puce"]=> string(0) "" ["old_adn"]=> string(0) "" ["old_cotation"]=> string(1) "0" ["old_affich_dysp"]=> string(1) "1" ["old_dysplasie_hanches"]=> string(0) "" ["old_dysplasie_coudes"]=> string(0) "" ["old_tan"]=> string(0) "" ["old_id_pere"]=> string(13) "3f40b84bea68d" ["old_id_mere"]=> string(1) "0" ["old_id_producteur"]=> string(3) "796" ["old_ix_producteur"]=> string(1) "1" ["old_id_proprietaire"]=> string(3) "276" ["old_ix_proprietaire"]=> string(1) "1" ["old_date_naissance"]=> string(10) "23/02/2001" ["old_nationalite"]=> string(6) "FRANCE" ["old_couleur"]=> string(13) "MASQUE MARRON" ["old_nom_photo"]=> string(0) "" ["old_observations"]=> string(0) "" ["old_cardio_obs"]=> string(4) "test" ["old_coeur_stenose_aorte"]=> string(1) "0" ["old_coeur_stenose_pulmo"]=> string(1) "0" ["old_coeur_cardio_myo"]=> string(1) "0" ["old_date_coeur_cardio_myo"]=> string(0) "" ["old_dispo_saillie"]=> string(1) "0" ["old_date_cotation"]=> string(10) "00/00/0000" ["old_gd_hpk"]=> string(1) "0" ["old_gd_wobbler"]=> string(1) "0" ["old_gd_cardio"]=> string(1) "0" ["old_gd_lipo"]=> string(1) "0" ["old_gd_ppm"]=> string(1) "0" ["old_gd_neph"]=> string(1) "0" ["old_gdu_hpk"]=> string(1) "0" ["old_gdu_wobbler"]=> string(1) "0" ["old_gdu_cardio"]=> string(1) "0" ["old_gdu_lipo"]=> string(1) "0" ["old_gdu_ppm"]=> string(1) "0" ["old_gdu_neph"]=> string(1) "0" ["old_cause_deces"]=> string(1) "0" ["old_date_deces"]=> string(10) "00/00/0000" ["select"]=> string(0) "" ["nom"]=> string(5) "KYLIE" ["surnom"]=> string(5) "STRAP" ["affixe"]=> string(19) "THE POWER OF DEMONS" ["sexe"]=> string(1) "2" ["couleur"]=> string(13) "MASQUE MARRON" ["date_naissance"]=> string(10) "23/02/2001" ["date_deces"]=> string(10) "00/00/0000" ["nationalite"]=> string(6) "FRANCE" ["no_lo"]=> string(13) "1111111111111" ["tatouage"]=> string(3) "DDD" ["no_puce"]=> string(0) "" ["id_pere"]=> int(3) ["nom_pere"]=> string(19) "CONAN DE ACHTERKRIM" ["id_mere"]=> string(1) "0" ["nom_mere"]=> string(0) "" ["id_producteur"]=> int(796) ["ix_producteur"]=> string(1) "1" ["nom_producteur"]=> string(16) "M Patrik HIDVEGI" ["id_proprietaire"]=> int(276) ["ix_proprietaire"]=> string(1) "1" ["nom_proprietaire"]=> string(21) "M Ga�tan LE TINEVEZ" ["adn"]=> string(0) "" ["cotation"]=> string(1) "0" ["affich_dysp"]=> string(2) "on" ["dysplasie_hanches"]=> string(0) "" ["dysplasie_coudes"]=> string(0) "" ["tan"]=> string(0) "" ["observations"]=> string(0) "" ["cardio_obs"]=> string(4) "test" ["coeur_stenose_aorte"]=> string(1) "0" ["coeur_stenose_pulmo"]=> string(1) "0" ["coeur_cardio_myo"]=> string(1) "0" ["date_coeur_cardio_myo"]=> string(10) "00/00/0000" ["nom_photo"]=> string(0) "" ["cause_deces"]=> string(1) "0" ["gd_hpk"]=> string(1) "0" ["gdu_hpk"]=> string(1) "0" ["gd_wobbler"]=> string(1) "0" ["gdu_wobbler"]=> string(1) "0" ["gd_cardio"]=> string(1) "0" ["gdu_cardio"]=> string(1) "0" ["gd_ppm"]=> string(1) "0" ["gdu_ppm"]=> string(1) "0" ["gd_neph"]=> string(1) "0" ["gdu_neph"]=> string(1) "0" ["gd_lipo"]=> string(1) "0" ["gdu_lipo"]=> string(1) "0" }

  10. #10
    Expert confirmé
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 368
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 368
    Billets dans le blog
    17
    Par défaut
    SPIP est-il à jour ? Il y a de fortes chances pour le pb vienne de lui.

    Pour mettre ça en évidence dans le script spip.php fais un var_dump( ) de $_POST avant tout appel aux fonctions SPIP.

  11. #11
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut
    J'étais en 2.1.10 et j'ai maj en 2.1.12, toujours le problème.

    Effectivement à l'entrée dans spip.php le dump est correct.
    Je vais essayer de chercher des problèmes similaires chez d'autres utilisateurs de spip.

  12. #12
    Expert confirmé
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 368
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 368
    Billets dans le blog
    17
    Par défaut
    Citation Envoyé par Gaëtan35 Voir le message
    Effectivement à l'entrée dans spip.php le dump est correct.
    Fais un var_dump( ) un peu plus loin, en tatonnant tu finiras par trouver la portion de script à l'origine du pb.

    Je vais essayer de chercher des problèmes similaires chez d'autres utilisateurs de spip.
    Tiens-nous au courant ;-)

  13. #13
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut
    J'ai trouvé une solution, j'ai... renommé la variable en "xx_pere"

    Pourvu que mes enfants ne lisent jamais ces lignes, quel échec

    Bref, je te remercie vivement pour ton aide, je n'ai pas hélas trouvé l'obscure source de mon problème.

  14. #14
    Membre averti
    Homme Profil pro
    cccccccccccc
    Inscrit en
    Juin 2003
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : cccccccccccc
    Secteur : Alimentation

    Informations forums :
    Inscription : Juin 2003
    Messages : 10
    Par défaut
    "Et la lumière fût !!!"

    Spip attend uniquement un entier dans les variables id_ $_POST et $_GET

    Je vais enfin reprendre goût à la vie

  15. #15
    Expert confirmé
    Avatar de Séb.
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    5 368
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 368
    Billets dans le blog
    17
    Par défaut
    interdit de passer une variable id_article (ou id_xxx) qui ne soit pas numerique (ce qui bloque l'exploitation de divers trous de securite,
    Fallait le savoir. Merci pour le retour !

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 22
    Dernier message: 04/09/2006, 13h53
  2. Récupération de la valeur d'un champ au nom variable
    Par Oluha dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 10/02/2005, 16h13

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