|
|
|
|
Bonsoir,
j'ai mis le fichier fiche.php dans le répertoire infos qui contient les .htaccess et htpassword et voici ce que j'obtient si je tente d'ouvrir le fichier (formulaire de mise à jour).
Peut-on m'expliquer ce qu'il me dit ?
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Apache/ProXad [Dec 3 2006 11:06:17] Server at txiki.free.fr Port 80
Merci d'avance !
je suis basque et ça voit, non ?
Le bonheur est la seule chose que l'on peut donner sans l'avoir.
Configuration: Windows XP Firefox 1.5.0.9
Salut dcanl,
<?
/* On se connecte et on choisi la base de données */
mysql_pconnect("localhost","root","") or die ("Impossible de se connecter à la base");
mysql_select_db("catalogue") or die("Impossible d'accéder au catalogue logiciels");
/* On va chercher les infos de la fiche correspondante du lien cliqué. */
$query_string = "SELECT groupe and categorie and source and editeur and nom and ligne_produit and socle and reference_DSI and standard_DSI and type_licence and version_standard and compatibilite_XP and versions_exploitation and type_deploiement and type_installation and domaine and fonctionnalite and description and instructions and pre_requis and referent_metier and commentaires FROM catalogue WHERE id";
$query = mysql_query($query_string);
if (mysql_num_rows($query)) {
?>
<h1> Fiche complète du logiciel </h1>
<p> Vous pouvez modifier les informations de cette fiche : </p>
<form METHOD="POST" action="<? $_SERVER['../PHP_SELF'] ?>">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td>Groupe: <input TYPE="text" name="groupe" VALUE="<? echo mysql_result($query,0,"groupe") ?>" SIZE="70" maxlength="255"></td>
</tr>
</table>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td width="50%">Catégorie: <input name="categorie" TYPE="text" VALUE="<? echo mysql_result($query,0,"categorie") ?>" SIZE="50"></td>
<td width="5"> </td>
<td width="50%">Source: <input type="text" name="source" value="<? echo mysql_result($query,0,"source") ?>" size="30" maxlength="100"></td>
</tr>
<tr>
<td width="50%">Editeur: <input TYPE="text" name="editeur" VALUE="<? echo mysql_query($query,0,"editeur") ?>" SIZE="53" maxlength="100"></td>
<td width="5"> </td>
<td width="50%">Nom: <input TYPE="text" name="nom" VALUE="<? echo mysql_result($query,0,"nom") ?>" SIZE="63" maxlength="255"></td>
</tr>
<tr>
<td width="50%">Ligne du produit: <input TYPE="text" name="ligne_produit" VALUE="<? echo mysql_result($query,0,"ligne_produit") ?>" SIZE="43" maxlength="100"></td>
<td width="5"> </td>
<td width="50%">Socle: <input TYPE="text" name="socle" VALUE="<? echo mysql_result($query,0,"socle") ?>" SIZE="40"></td>
</tr>
<tr>
<td width="50%">Référence DSI: <input TYPE="text" name="reference_DSI" VALUE="<? echo mysql_result($query,0,"reference_DSI") ?>" SIZE="10"></td>
<td width="5"> </td>
<td width="50%">Standard DSI: <input TYPE="text" name="standard_DSI" VALUE="<? echo mysql_result($query,0,"standard_DSI") ?>" SIZE="35"></td>
</tr>
<tr>
<td width="50%">Type de licence: <input TYPE="text" name="type_licence" VALUE="<? echo mysql_result($query,0,"type_licence") ?>" SIZE="44" maxlength="100"></td>
<td width="5"> </td>
<td width="50%">Version standard: <input TYPE="text" name="version_standard" VALUE="<? echo mysql_result($query,0,"version_standard") ?>" SIZE="50" maxlength="150"></td>
</tr>
<tr>
<td width="50%">Compatibilité XP: <input TYPE="text" name="compatibilite_XP" VALUE="<? echo mysql_result($query,0,"compatibilite_XP") ?>" SIZE="43" maxlength="100"></td>
<td width="5"> </td>
<td width="50%">Versions en exploitation: <input TYPE="text" name="versions_exploitation" VALUE="<? echo mysql_result($query,0,"versions_exploitation") ?>" SIZE="20"></td>
</tr>
<tr>
<td width="50%">Type de déploiement:
<input type="text" name="type_deploiement" value="<? echo mysql_result($query,0,"type_deploiement") ?>" size="30"></td>
<td width="5"> </td>
<td width="50%">Type d'installation: <input TYPE="text" name="type_installation" VALUE="<? echo mysql_result($query,0,"type_installation") ?>" SIZE="49"></td>
</tr>
<tr>
<td width="50%">Domaine: <input TYPE="text" name="domaine" VALUE="<? echo mysql_result($query,0,"domaine") ?>" SIZE="51"></td>
<td width="5"> </td>
<td width="50%">Fonctionnalité: <input TYPE="text" name="fonctionnalite" VALUE="<? echo mysql_result($query,0,"fonctionnalite") ?>" SIZE="53" maxlength="255"></td>
</tr>
<tr>
<td width="50%">Description: <input TYPE="text" name="description" VALUE="<? echo mysql_result($query,0,"description") ?>" SIZE="49" maxlength="255"></td>
<td width="5"> </td>
<td width="50%">Instructions: <input name="instructions" TYPE="text" VALUE="<? echo mysql_result($query,0,"instructions") ?>" SIZE="55" maxlength="255"></td>
</tr>
<tr>
<td width="50%">Pré-requis: <input name="pre_requis" TYPE="text" VALUE="<? echo mysql_result($query,0,"pre_requis") ?>" SIZE="50" maxlength="255"></td>
<td width="5"> </td>
<td width="50%">Référent métier: <input TYPE="text" name="referent_metier" VALUE="<? echo mysql_result($query,0,"referent_metier") ?>" SIZE="51" maxlength="255"></td>
</tr>
</table>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td>Commentaires: <input TYPE="text" name="commentaires" VALUE="<? echo mysql_result($query,0,"commentaires") ?>" SIZE="130" maxlength="255"></td>
</tr>
</table>
<br>
<p class="bouton"><input TYPE="submit" VALUE="Valider la modification"></p>
<input TYPE="hidden" name="id" value="<? echo $id='id' ?>">
<input TYPE="hidden" name="submited" value="1">
</form>
<?
} else {
echo "<h1> Mise à jour d'un logiciel </h1>";
$query_string = "UPDATE catalogue SET groupe='$groupe', categorie='$categorie', source='$source', editeur='$editeur', nom='$nom', ligne_produit='$ligne_produit', socle='$socle', reference_DSI='$reference_DSI', standard_DSI='$standard_DSI', type_licence='$type_licence', version_standard='$version_standard', compatibilite_XP='$compatibilite_XP', versions_exploitation='$versions_exploitation', type_deploiement='$type_deploiement', type_installation='$type_installation', domaine='$domaine', fonctionnalite='$fonctionnalite', description='$description', instructions='$instructions', pre_requis='$pre_requis', referent_metier='$referent_metier', commentaires='$commentaires' WHERE id=$id";
$query=mysql_query($query_string);
if ($query) {
echo "<p class=\"reussie\"> Mise à jour effectuée </p>";
} else {
echo "<p class=\"echec\"> Problème lors de la mise à jour </p>";
echo "<p>" . mysql_error() . "</p>";
}
}
?>
</table>
PS: je suis obligé de mettre root et pas de pass pour pouvoir le faire fonctionner en local (easyphp). le.htaccess: PerlSetVar infos/pass/listpass.txt AuthFile infos/pass/ AuthName "Acces Restreint" AuthType Basic require user txiki sylvie crhis <Limit GET POST> order deny,allow deny from ALL </Limit> le.htpasswd: (dans le répertoire pass se trouvant dans le répertoire infos à la racine du site) txiki:******** sylvie:******** chris:******** Voir sur le site de test txiki: http://txiki.free.fr/ merci d'avance de t'etre penché sur mon Pb ;-))) Le bonheur est la seule chose que l'on peut donner sans l'avoir. |
OUPS ! ! !
deny from ALLpour protéger la lecture de la liste des users autorisés. Ce répertoire pass se trouve à l'intérieur du répertoire infos (à la racine du site) et contient le htaccess du précédent post. Le bonheur est la seule chose que l'on peut donner sans l'avoir. |