Précédent   Forum des professionnels en informatique > PHP > Langage
Langage Forum sur le langage PHP, la POO, les conventions, la sécurité, etc. Avant de poster : FAQ Langage, toutes les FAQ PHP, cours langage et sources PHP
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 30/12/2010, 13h18   #1
Nouveau Membre du Club
 
Homme
Inscription : février 2009
Messages : 93
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : février 2009
Messages : 93
Points : 31
Points : 31
Par défaut Une erreur difficile à détecter

Bonjour cher ami et bonne fête de fin d'année,
je ne parviens pas à trouver mon erreur qui me provoque une page blanche à l'affiche. Après quelques manipulation j'ai eu ce message d'erreur de syntaxe à la ligne 235 de mon script que je crois avoir corriger mais le problème de page blanche persiste, alors je voudrais vous soumettre mon problème esperant obtenir une aide.
je vous montre mon code
Citation:
Code :
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
<?php
	session_start();
	$titre="Administration";
	// $balises = true;
	include("./includes/identifiants.php");
	include("./includes/debut.php");
	include("./includes/menu.php");
 
	// On indique ou l'on se trouve
	$cat = (isset($_GET['cat']))?htmlspecialchars($_GET['cat']):'';
	echo '<p><i>Vous êtes ici</i> : <a href="./index.php">Index du forum</a> -->  <a href="./admin.php">Administration du forum</a>';
	if (!verif_auth(ADMIN)) erreur(ERR_AUTH_ADMIN);
 
	switch($cat) //1er switch
	{
		case "config":
			//ici configuration
			echo'<h1>Configuration du forum</h1>';
			echo '<form method="post" action="adminok.php?cat=config">';
			//Le tableau associatif
			$config_name = array(
									"avatar_maxsize" => "Taille maximale de l'avatar",
									"avatar_maxh" => "Hauteur maximale de l'avatar",
									"avatar_maxl" => "Largeur maximale de l'avatar",
									"sign_maxl" => "Taille maximale de la signature",
									"auth_bbcode_sign" => "Autoriser le bbcode dans la signature",
									"pseudo_maxsize" => "Taille maximale du pseudo",
									"pseudo_minsize" => "Taille minimale du pseudo",
									"topic_par_page" => "Nombre de topics par page",
									"post_par_page" => "Nombre de posts par page",
									"forum_titre" => "Titre du forum"
								);
			$query = $db->query('SELECT config_nom, config_valeur FROM forum_config');
 
			while($data=$query->fetch())
			{
				echo '<p><label for='.$data['config_nom'].'>'.$config_name[$data['config_nom']].' </label> : <input type="text" id="'.$data['config_nom'].'" value="'.$data['config_valeur'].'" name="'.$data['config_nom'].'"></p>';
			}
			echo '<p><input type="submit" value="Envoyer" /></p></form>';
			$query->CloseCursor();
 
		break;
 
		case "forum":
			//Ici forum
			$action = htmlspecialchars($_GET['action']); //On récupère la valeur de action
			switch($action) //2eme switch
			{
				case "creer":
					//Création d'un forum
					//1er cas : pas de variable c
					if(empty($_GET['c']))
					{
						echo'<br /><br /><br />Que voulez-vous faire?<br /> <a href="./admin.php?cat=forum&action=creer&c=f">Créer un forum</a><br /> <a href="./admin.php?cat=forum&action=creer&c=c">Créer une catégorie</a></br>';
					}
						//2ème cas : on cherche à créer un forum (c=f)
					elseif($_GET['c'] == "f")
					{
						$query=$db->query('SELECT cat_id, cat_nom FROM forum_categorie ORDER BY cat_ordre DESC');
						echo'<h1>Création d un forum</h1>';
						echo'<form method="post" action="./adminok.php?cat=forum&action=creer&c=f">';
						echo'<label>Nom :</label><input type="text" id="nom" name="nom" /><br /><br /> <label>Description :</label> <textarea cols=40 rows=4 name="desc" id="desc"></textarea> <br /><br /> <label>Catégorie : </label><select name="cat">';
						while($data = $query->fetch())
						{
							echo'<option value="'.$data['cat_id'].'">'.$data['cat_nom'].'</option>';
						}
						echo'</select><br /><br />    <input type="submit" value="Envoyer"></form>';
						$query->CloseCursor();
					}       
						//3ème cas : on cherche à créer une catégorie (c=c)
					elseif($_GET['c'] == "c")
					{
						echo'<h1>Création d une catégorie</h1>';
						echo'<form method="post" action="./adminok.php?cat=forum&action=creer&c=c">';
						echo'<label> Indiquez le nom de la catégorie :</label> <input type="text" id="nom" name="nom" /><br /><br />  <input type="submit" value="Envoyer"></form>';
					}
				break;
 
				case "edit":
					//Edition d'un forum
					 echo'<h1>Edition d un forum</h1>';
					if(!isset($_GET['e']))
					{
						echo'<p>Que voulez vous faire ?<br /> <a href="./admin.php?cat=forum&action=edit&amp;e=editf"> Editer un forum</a><br /> <a href="./admin.php?cat=forum&action=edit&amp;e=editc"> Editer une catégorie</a><br /> <a href="./admin.php?cat=forum&action=edit&amp;e=ordref"> Changer l\'ordre des forums.</a><br />  <a href="./admin.php?cat=forum&action=edit&amp;e=ordrec"> Changer l\'ordre des catégories</a> <br /></p>';
					}
					 elseif($_GET['e'] == "editf")
					{
						//On affiche dans un premier temps la liste des forums
						if(!isset($_POST['forum']))
						{
							$query=$db->query('SELECT forum_id, forum_name FROM forum_forum ORDER BY forum_ordre DESC');
							echo'<form method="post" action="admin.php?cat=forum&amp;action=edit&amp;e=editf">';
							echo'<p>Choisir un forum :</br /></h2> <select name="forum">';
							while($data = $query->fetch())
							{
								echo'<option value="'.$data['forum_id'].'"> '.stripslashes(htmlspecialchars($data['forum_name'])).'</option>';
							}
							echo'<input type="submit" value="Envoyer"></p></form>';
							$query->CloseCursor();
						}               
						//Ensuite, on affiche les renseignements sur le forum choisi
						else
						{
							$query = $db->prepare('SELECT forum_id, forum_name, forum_desc, forum_cat_id FROM forum_forum WHERE forum_id = :forum');
							$query->bindValue(':forum',(int) $_POST['forum'],PDO::PARAM_INT);
							$query->execute();
							$data1 = $query->fetch();
							echo'<p>Edition du forum <strong>'.stripslashes(htmlspecialchars($data1['forum_name'])).'</strong></p>';
							echo'<form method="post" action="adminok.php?cat=forum&amp;action=edit&amp;e=editf"> <label>Nom du forum : </label><input type="text" id="nom" name="nom" value="'.$data1['forum_name'].'" /> <br /> <label>Description :</label><textarea cols=40 rows=4 name="desc" id="desc">'.$data1['forum_desc'].'</textarea><br /><br />';
							$query->CloseCursor();				  
							//A partir d'ici, on boucle toutes les catégories,
							//On affichera en premier celle du forum
							$query = $db->query('SELECT cat_id, cat_nom FROM forum_categorie ORDER BY cat_ordre DESC');
							echo'<label>Déplacer le forum vers : </label> <select name="depl">';
							while($data2 = $query->fetch())
							{
								if($data2['cat_id'] == $data1['forum_cat_id'])
								{
									echo'<option value="'.$data2['cat_id'].'" selected="selected">'.stripslashes(htmlspecialchars($data2['cat_nom'])).' </option>';
								}
								else
								{
									echo'<option value="'.$data2['cat_id'].'">'.$data2['cat_nom'].'</option>';
								}
							}
							echo'</select><input type="hidden" name="forum_id" value="'.$data1['forum_id'].'">';
							echo'<p><input type="submit" value="Envoyer"></p></form>';
							$query->CloseCursor();				  
					    }
					}
					 elseif($_GET['e'] == "editc")
					{
						//On commence par afficher la liste des catégories
						if(!isset($_POST['cat']))
						{
							$query = $db->query('SELECT cat_id, cat_nom FROM forum_categorie ORDER BY cat_ordre DESC');
							echo'<form method="post" action="admin.php?cat=forum&amp;action=edit&amp;e=editc">';
							echo'<p>Choisir une catégorie :</br /> <select name="cat">';
							while($data = $query->fetch())
							{
								echo'<option value="'.$data['cat_id'].'">'.$data['cat_nom'].'</option>';
							}
							echo'<input type="submit" value="Envoyer"></p></form>';		
							$query->CloseCursor();				  					
						}         
							//Puis le formulaire
						else
						{
							$query = $db->prepare('SELECT cat_nom FROM forum_categorie WHERE cat_id = :cat');
							$query->bindValue(':cat',(int) $_POST['cat'],PDO::PARAM_INT);
							$query->execute();
							$data = $query->fetch();
							echo'<form method="post" action="./adminok.php?cat=forum&amp;action=edit&amp;e=editc">';
							echo'<label> Indiquez le nom de la catégorie :</label> <input type="text" id="nom" name="nom" value="'.stripslashes(htmlspecialchars($data['cat_nom'])).'" /> <br /><br /> 	<input type="hidden" name="cat" value="'.$_POST['cat'].'" />  <input type="submit" value="Envoyer" /></p></form>';
							$query->CloseCursor();				  
						}
					}
					elseif($_GET['e'] == "ordref")
					{
						$categorie="";
						$query = $db->query('SELECT forum_id, forum_name, forum_ordre, forum_cat_id, cat_id, cat_nom FROM forum_categorie LEFT JOIN forum_forum ON cat_id = forum_cat_id ORDER BY cat_ordre DESC');
						echo'<form method="post" action="adminok.php?cat=forum&amp;action=edit&amp;e=ordref">';
						echo '<table>';
						while($data = $query->fetch())
						{
							if( $categorie !== $data['cat_id'] )
							{
								$categorie = $data['cat_id'];
								echo' <tr> <th><strong>'.stripslashes(htmlspecialchars($data['cat_nom'])).'</strong></th> <th><strong>Ordre</strong></th> </tr>';
							}
							echo'<tr><td> <a href="./voirforum.php?f='.$data['forum_id'].'">'.$data['forum_name'].'</a></td> <td><input type="text" value="'.$data['forum_ordre'].'" name="'.$data['forum_id'].'" /> </td></tr>';
						}
						echo'</table> <p><input type="submit" value="Envoyer" /></p></form>';
					}
					elseif($_GET['e'] == "ordrec")
					{
						$query = $db->query('SELECT cat_id, cat_nom, cat_ordre FROM forum_categorie ORDER BY cat_ordre DESC');
						echo'<form method="post" action="adminok.php?cat=forum&amp;action=edit&amp;e=ordrec">';
						while($data = $query->fetch())
						{
							echo'<label>'.stripslashes(htmlspecialchars($data['cat_nom'])).' :</label> <input type="text" value="'.$data['cat_ordre'].'"name="'.$data['cat_id'].'" /><br /><br />';
						}
						echo '<input type="submit" value="Envoyer" /></form>';
						$query->CloseCursor();				  					
					}
				break;
 
				case "droits":
					//Gestion des droits
					 echo'<h1>Edition des droits</h1>';     
 
					if(!isset($_POST['forum']))
					{
						$query=$db->query('SELECT forum_id, forum_name FROM forum_forum ORDER BY forum_ordre DESC');
						echo'<form method="post" action="admin.php?cat=forum&action=droits">';
						echo'<p>Choisir un forum :</br /> <select name="forum">';
						while($data = $query->fetch())
						{
							echo'<option value="'.$data['forum_id'].'">'.$data['forum_name'].'</option>';
						}
						echo'<input type="submit" value="Envoyer"></p></form>';
						$query->CloseCursor();				  					
					}
					else
					{
						$query = $db->prepare('SELECT forum_id, forum_name, auth_view,  auth_post, auth_topic, auth_annonce, auth_modo FROM forum_forum WHERE forum_id = :forum');
						$query->bindValue(':forum',(int) $_POST['forum'], PDO::PARAM_INT);
						$query->execute();
						echo '<form method="post" action="adminok.php?cat=forum&action=droits"><p><table><tr> <th>Lire</th> <th>Répondre</th> <th>Poster</th> <th>Annonce</th> <th>Modérer</th> </tr>';
						$data = $query->fetch();
							//Ces deux tableaux vont permettre d'afficher les résultats
						$rang = array(
										VISITEUR=>"Visiteur",
										INSCRIT=>"Membre", 
										MODO=>"Modérateur",
										ADMIN=>"Administrateur"
									);
						$list_champ = array("auth_view", "auth_post", "auth_topic","auth_annonce", "auth_modo");
							//On boucle
						foreach($list_champ as $champ)
						{
							echo'<td><select name="'.$champ.'">';
							for($i=1;$i<5;$i++)
							if ($i == $data[$champ])
							{
								echo'<option value="'.$i.'" selected="selected">'.$rang[$i].'</option>';
							}	
							else
							{
								echo'<option value="'.$i.'">'.$rang[$i].'</option>';
							}
						}
						echo'</td></select>';
					}	
					echo'<br /><input type="hidden" name="forum_id" value="'.$data['forum_id'].'" /> <input type="submit" value="Envoyer" /></p></form>';			          
					$query->CloseCursor();				  					
			}
			echo '</table>';
 
				break;
 
				default; //action n'est pas remplie, on affiche le menu
				echo'<h1>Administration des forums</h1>';
				echo'<p>Bonjour, cher administrateur, que veux tu faire ? <br /> <a href="./admin.php?cat=forum&amp;action=creer">Créer un forum</a> <br /> <a href="./admin.php?cat=forum&amp;action=edit">Modifier un forum</a> <br /> <a href="./admin.php?cat=forum&amp;action=droits"> Modifier les droits d\'un forum</a><br /></p>'; 
				break;
			}
		break;
 
		case "membres":
			//Ici membres
			$action = htmlspecialchars($_GET['action']); //On récupère la valeur de action
			switch($action) //2eme switch
			{
				case "edit":
					//Edition d'un membre
					 echo'<h1>Edition du profil d\'un membre</h1>';   
					if(!isset($_POST['membre'])) //Si la variable $_POST['membre'] n'existe pas
					{
						echo'De quel membre voulez-vous éditer le profil ?<br />';
						echo'<br /><form method="post" action="./admin.php?cat=membres&amp;action=edit"> <p><label for="membre">Inscrivez le pseudo : </label>  <input type="text" id="membre" name="membre"><input type="submit" name="Chercher"> </p></form>';
					}
					 else //sinon
					{
						$pseudo_d = $_POST['membre'];
						//Requête qui ramène des info sur le membre à 
						//Partir de son pseudo
						$query = $db->prepare('SELECT membre_id, membre_pseudo, membre_email, membre_siteweb, membre_signature, membre_msn, membre_localisation, membre_avatar FROM forum_membres WHERE LOWER(membre_pseudo)=:pseudo');
						$query->bindValue(':pseudo',strtolower($pseudo_d),PDO::PARAM_STR);
						$query->execute();    
						//Si la requête retourne un truc, le membre existe
						if ($data = $query->fetch()) 
						{
?>
							<form method="post" action="adminok.php?cat=membres&amp;action=edit" enctype="multipart/form-data">
								<fieldset><legend>Identifiants</legend>
									<label for="pseudo">Pseudo :</label>
									<input type="text" name="pseudo" id="pseudo" value="<?php echo stripslashes(htmlspecialchars($data['membre_pseudo'])) ?>" /><br />
								</fieldset>
								<fieldset><legend>Contacts</legend>
									<label for="email">Adresse E_Mail :</label>
									<input type = "text" name="email" id="email" value="<?php echo stripslashes(htmlspecialchars($data['membre_email'])) ?>" /><br />
									<label for="msn">Adresse MSN :</label>
									<input type = "text" name="msn" id="msn" value="<?php echo stripslashes(htmlspecialchars($data['membre_msn'])) ?>" /><br />
									<label for="website">Site web :</label>
									<input type = "text" name="website" id="website" value="<?php echo stripslashes(htmlspecialchars($data['membre_siteweb'])) ?>"/><br />
								</fieldset>
								<fieldset><legend>Informations supplémentaire</legend>
									<label for="localisation">Localisation :</label>
									<input type = "text" name="localisation" id="localisation" value="<?php echo stripslashes(htmlspecialchars($data['membre_localisation'])) ?>" /><br />
								</fieldset>
								<fieldset><legend>Profil sur le forum</legend>
									<label for="avatar">Changer l'avatar :</label>
									<input type="file" name="avatar" id="avatar" />	<br /><br />
									<label><input type="checkbox" name="delete" value="Delete" /> Supprimer l'avatar</label>
									Avatar actuel : <?php echo'<img src="./images/avatars/'.$data['membre_avatar'].'" alt="pas d\'avatar" />' ?>	<br /><br />
									<label for="signature">Signature :</label>
									<textarea cols=40 rows=4 name="signature" id="signature"> <?php echo nl2br(stripslashes(htmlspecialchars($data['membre_signature']))) ?></textarea>	<br /></h2>
								</fieldset>
<?php
							echo'<input type="hidden" value="'.stripslashes($pseudo_d).'" name="pseudo_d"> <input type="submit" value="Modifier le profil" /></form>';
							$query->CloseCursor();
						}
						else
						{	
							echo' <p>Erreur : Ce membre n\'existe pas, <br /> cliquez <a href="./admin.php?cat=membres&amp;action=edit">ici</a> pour réessayez</p>';
						}
					}
				break;
 
				case "droits":
					//Droits d'un membre (rang)
					echo'<h1>Edition des droits d\'un membre.</h1>';  
					if(!isset($_POST['membre']))
					{
						echo'De quel membre voulez-vous modifier les droits ?<br />';
						echo'<br /><form method="post" action="./admin.php?cat=membres&action=droits">  <p><label for="membre">Inscrivez le pseudo : </label> <input type="text" id="membre" name="membre"> <input type="submit" value="Chercher"></p></form>';
					}
					else
					{
						$pseudo_d = $_POST['membre'];
						$query = $db->prepare('SELECT membre_pseudo,membre_rang FROM forum_membres WHERE LOWER(membre_pseudo) = :pseudo');
						$query->bindValue(':pseudo',strtolower($pseudo_d),PDO::PARAM_STR);
						$query->execute();
						if ($data = $query->fetch())
						{       
							echo'<form action="./adminok.php?cat=membres&amp;action=droits" method="post">';
							$rang = array(
											0 => "Bannis",
											1 => "Visiteur", 
											2 => "Membre", 
											3 => "Modérateur", 
											4 => "Administrateur"
										 ); //Ce tableau associe numéro de droit et nom
							echo'<label>'.$data['membre_pseudo'].'</label>';
							echo'<select name="droits">';
							for($i=0;$i<5;$i++)
							{
								if ($i == $data['membre_rang'])
								{
									echo'<option value="'.$i.'" selected="selected">'.$rang[$i].'</option>';
								}
								else
								{
									echo'<option value="'.$i.'">'.$rang[$i].'</option>';
								}
							}
							echo'</select> <input type="hidden" value="'.stripslashes($pseudo_d).'" name="pseudo"> 	<input type="submit" value="Envoyer"></form>';
							$query->CloseCursor();
						}				  					
						else
						{
							echo' <p>Erreur : Ce membre n\'existe pas, <br /> cliquez <a href="./admin.php?cat=membres&amp;action=edit">ici</a> pour réessayer</p>';
						}
					}
				break;
 
				case "ban":
					//Bannissement
					 echo'<h1>Gestion du bannissement</h1>'; 
					//Zone de texte pour bannir le membre
					echo'Quel membre voulez-vous bannir ?<br />';
					echo'<br /> <form method="post" action="./adminok.php?cat=membres&amp;action=ban"> <label for="membre">Inscrivez le pseudo : </label>  <input type="text" id="membre" name="membre"> <input type="submit" value="Envoyer"><br />'; 
					//Ici, on boucle : pour chaque membre banni, on affiche une checkbox
					//Qui propose de le débannir
					$query = $db->query('SELECT membre_id, membre_pseudo FROM forum_membres WHERE membre_rang = 0');
					//Bien sur, on ne lance la suite que s'il y a des membres bannis !
					if ($query->rowCount() > 0)
					{
						while($data = $query->fetch())
						{
							echo'<br /><label><a href="./voirprofil.php?action=consulter&amp;m='.$data['membre_id'].'"> '.stripslashes(htmlspecialchars($data['membre_pseudo'])).'</a></label> <input type="checkbox" name="'.$data['membre_id'].'" /> Débannir<br />';
						}
						echo'<p><input type="submit" value="Go !" /></p></form>';
					}
					else
					{
						echo' <p>Aucun membre banni pour le moment :p</p>';
					}
					$query->CloseCursor();
				break;
 
				default; //action n'est pas remplie, on affiche le menu 
				echo'<h1>Administration des membres</h1>';
				echo'<p>Salut mon ptit, alors tu veux faire quoi ?<br /> <a href="./admin.php?cat=membres&amp;action=edit"> Editer le profil d\'un membre</a><br /> <a href="./admin.php?cat=membres&amp;action=droits"> Modifier les droits d\'un membre</a><br />  <a href="./admin.php?cat=membres&amp;action=ban"> Bannir <-> Debannir un membre</a><br /></p>';
				break;
			}
		break;
		default; //cat n'est pas remplie, on affiche le menu général
		echo'<h1>Index de l\'administration</h1>';
		echo'<p>Bienvenue sur la page d\'administration.<br /> <a href="./admin.php?cat=config">Configuration du forum</a><br /> <a href="./admin.php?cat=forum">Administration des forums</a><br /> <a href="./admin.php?cat=membres">Administration des membres</a><br /></p>';
	break;
	}
?>          
</div>
</body>
</html>
Merci et bonne journée à vous tous.
herzak est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 14h00   #2
Membre Expert
 
Avatar de Madfrix
 
Inscription : juin 2007
Messages : 2 278
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2007
Messages : 2 278
Points : 2 324
Points : 2 324
Bonjour,

quid du case "" (si !isset($_GET['cat'])) ? Tu ne définis pas le cas.

Que donnent les logs php sinon ?

Remplace momentanément tes include par des require voir si les chemins sont corrects
Madfrix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 15h38   #3
Nouveau Membre du Club
 
Homme
Inscription : février 2009
Messages : 93
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : février 2009
Messages : 93
Points : 31
Points : 31
Merci de votre aide mais l'erreur est toujours présente page très blanche
et aussi mon fichier de log est quand à lui vide aucune ligne dedans.
c'est lequel des case du switch que je n'ai pas définit je ne vois pas
quand à la gestion des erreurs mon php.ini est bien configuré.
Merci de m'aider
herzak est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 15h45   #4
Membre Expert
 
Avatar de Madfrix
 
Inscription : juin 2007
Messages : 2 278
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2007
Messages : 2 278
Points : 2 324
Points : 2 324
Code php :
1
2
 
$cat = (isset($_GET['cat'])) ? htmlspecialchars($_GET['cat']) : '';

donc $cat peut valoir ''. or tu ne traites pas le cas dans ton switch. Ceci dit tu n'es pas obligé

Pour ta page blanche, fais ceci :

Code php :
1
2
3
4
5
 
<?php
echo "un test";
 
exit;

et dis nous si tu vois "un test" s'afficher
Madfrix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 16h37   #5
Nouveau Membre du Club
 
Homme
Inscription : février 2009
Messages : 93
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : février 2009
Messages : 93
Points : 31
Points : 31
C'est vraiment bizarre et même très étrange je dirais
j'ai ajouté le
Code :
1
2
 <?php echo " un test "; 
exit ;?>
et mis le reste de mon script en commentaire ma page reste toujours blanche.
petite remarque je suis en localhost avec wamp.
Merci
herzak est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 18h09   #6
Membre Expert
 
Avatar de Madfrix
 
Inscription : juin 2007
Messages : 2 278
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2007
Messages : 2 278
Points : 2 324
Points : 2 324
Ajoute un texte brut avant le <?php voir s'il s'affiche. Si c'est pas le cas, vérifies quand même si tu affiches bien le bon fichier voulu...

et regardes les logs sous wamp/logs
Madfrix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 19h36   #7
Nouveau Membre du Club
 
Homme
Inscription : février 2009
Messages : 93
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : février 2009
Messages : 93
Points : 31
Points : 31
Message de la dernière ligne quand je veux acceder à la page se trouvant dans acces.log
Citation:
Code :
127.0.0.1 - - [30/Dec/2010:18:28:09 +0000] "GET /ivoirehub/Administration/admi.php HTTP/1.1" 404 231
dernière ligne apache.log
Citation:
Code :
[Thu Dec 30 18:28:10 2010] [error] [client 127.0.0.1] script 'D:/wamp/www/ivoirehub/Administration/admi.php' not found or unable to stat, referer: http://localhost/ivoirehub/voirprofil.php?m=2&action=consulter
Je pense comprendre que je dois chercher du coté de ma page voirprofil.php
donc je vais essayer de regarder à ce niveau et voir aussi.
le texte brut avant la balise php ne s'affiche pas. Je corrige mes scripts et je vous dit la suite.
Merci
herzak est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 20h12   #8
Membre Expert
 
Avatar de Madfrix
 
Inscription : juin 2007
Messages : 2 278
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2007
Messages : 2 278
Points : 2 324
Points : 2 324
admi.php ? ne serait ce pas admin.php plutot la page que tu cherches à afficher ?
Madfrix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/12/2010, 21h07   #9
Nouveau Membre du Club
 
Homme
Inscription : février 2009
Messages : 93
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : février 2009
Messages : 93
Points : 31
Points : 31
Je suis vraiment tete en l'air, avec cette grosse boulette j'alerte toute la communauté en ces temps de fêtes si agréable. Merci pour m'avoir aidé prochainement j'ouvrirais grandement mes yeux pour travailler.

Ma page s'affiche avec des erreurs vraiment minime sur mes fichiers includes que je peux corriger tout seul merci encore et bonne fiin de journée surtout agréable fête à vous
herzak est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 15h37.


 
 
 
 
Partenaires

Hébergement Web