BalooCantalou | omega2 a écrit :
BalooCantalou > C'est exactment ça pour le $ . Ca indique bien que c'est une variable. T'avais bien compris le truc.
Juste pour info, en php, $var() indique qu'on fait appel à la fonction dont le nom est contenu dans la variable $var et $$var qu'on utilise la valeur contenu dans la variable dont le nom est le contenu de la variable $var.
Si t'avais rien modifié au début alors autant pour moi. Ton premier message m'avait induit en erreur. Je te présente mes excuse sur ce point.
J'ai vu que t'as jamais posté le fichier php entié, juste quelques bouts. Est ce que tu pourais nous le poster en entier qu'on puisse vérifier que les variables utilisés dans la requête sont bien initialisé.
Pour le fichier data.php, il y a d'autres variables ou juste celles que t'as déjà indiqué? Pour arriver à utiliser la base de donnée, un script php a toujorus besoin de trois informations : l'adresse du serveur sql, le nom d'utilisateur et le mot de passe. Est ce que t'as bien indiqué ces trois infos là? Je te demande pas de les poster vu que les deux derniéres sont des infos sensibles.
Dernier détail auquel je viens de penser. Depuis quelques mois, dans les réglages par défauts, l'option "register_globals" est passé de "on" (comme pendant longtemps) à "off" (comme maintenant). Ce changement fait que les infos envoyés par le navigateur et certaines données du serveur ne sont pas transformé en variable classique (de type $var) mais son disponible uniquement dans des variables tableau spéciales telles que $_SERVER et $_POST.
Pour vérifier si ce réglage est à "on" ou "off", il faut créer un ficheir php contenant le code Code :
- <?php phpinfo(4); ?>
|
et regarder ce qui s'affiche dans le navigateur quand on l'apelle. Il y a alors une ligne commencant par "register_globals" ca indique la valeur du réglage.
Normalement, ca devrait pas jouer sur ton probléme actuel mais si le script est pas préparé pour le cas du "register_global" est à "off", ca peut poser probléme quand on poste des commentaires.
|
OK...voici mon fichier request.php complet:
<?php
/******************************************************************
* XLAgenda 3.2.1 par Xavier LE QUERE
* Contact : xavier@lequere.net
* Web : http://www.xavier.lequere.net/xlagenda
* (C) Xavier LE QUERE, 2003-2004
* Version 3.2.1 - 30/12/04
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
******************************************************************/
/*********************************************************************
* NE PAS EDITER CE FICHIER
* POUR PERSONNALISER XLAgenda 3.1.1 EDITEZ header.php ET footer.php
* VOUS POUVEZ AUSSI EDITER LA FEUILLE DE STYLE
*********************************************************************/
$query="SELECT * FROM $table_agenda WHERE (date_debut <= '$year-$month-$next' AND date_fin >= '$year-$month-$next') OR (date_debut='$year-$month-$next') AND actif='1'";echo "$query<br>";
$result=mysql_query($query);
$total=mysql_num_rows($result);
if (!$total)
{
if ($month == $this_month AND $year == $this_year AND $next == $this_day)
{
echo "<td align=\"center\"><b>$next</b></td>\n";
}
else
{
echo "<td align=\"center\">$next</td>\n";
}
}
if ($total)
{
if ($month == $this_month AND $year == $this_year AND $next == $this_day)
{
echo "<td align=\"center\"><b><a href=\"/$path_agenda/$url_page?day=$next&month=$month&year=$year\">$next</a></b></td>\n";
}
else
{
echo "<td align=\"center\"><a href=\"/$path_agenda/$url_page?day=$next&month=$month&year=$year\">$next</a></td>\n";
}
}
?>
Et le fichier data.php...pour les mots de passe, je les changerai plus tard...
<?php
/******************************************************************
* XLAgenda 3.2.1 par Xavier LE QUERE
* Contact : xavier@lequere.net
* Web : http://www.xavier.lequere.net/xlagenda
* (C) Xavier LE QUERE, 2003-2004
* Version 3.2.1 - 30/12/04
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
******************************************************************/
/******************************************************************
* POUR QUE L'APPLICATION FONCTIONNE, VOUS DEVEZ EDITER ET
* COMPLETER CE FICHIER AVEC LES VARIABLES MANQUANTES
******************************************************************/
//VERSION - NE PAS MODIFIER NI SUPPRIMER
$version="3.2.1";
//INDIQUER ICI LES DONNEES DE CONNEXION A VOTRE BASE DE DONNEES FOURNIES PAR VOTRE HEBERGEUR
$dbserver="xxxxxx"; //ADRESSE DU SERVEUR SQL
$dbdb="xxxxxx"; //NOM DE LA BASE DE DONNEES A UTILISER
$dbuser="xxxxxx"; //NOM D'UTILISATEUR DE LA LA BASE DE DONNEES A UTILISER
$dbpass="xxxxx"; //MOT DE PASSE DE LA BASE DE DONNEES A UTILISER
//LES TABLES SERONT CONSTRUITES AUTOMATIQUEMENT - CHANGEZ LES NOMS SI VOUS AVEZ DEJA DANS VOTRE BASE DE DONNEES DES TABLES PORTANT LES MEMES NOMS
$table_categories="agendacategories"; //NOM DE LA TABLE DES CATEGORIES
$table_users="agendausers"; //NOM DE LA TABLE DES UTILISATEURS
$table_agenda="agenda"; //NOM DE LA TABLE GENERALE
$table_logs="agendalogs"; //NOM DE LA TABLE DES LOGS DE CONNEXION
$table_demande="agendademande"; //NOM DE LA TABLE DES DEMANDES DE COMPTES
//URL DES PAGES
$path_agenda="xlagenda321"; //ACCES A L'AGENDA PAR RAPPORT A LA RACINE DU SITE
$url_page="agendaindex.php"; //URL DE LA PAGE DE L'AGENDA
$url_compte="compte.php"; //URL DE LA PAGE DE DEMANDE DE COMPTE
$url_recherche="rechercher.php"; //URL DE LA PAGE DE RECHERCHE
$repertoire_admin="admin"; //NOM DU REPERTOIRE DE L'ADMIN
//TITRE
$titre_page="XLAgenda $version"; //TITRE DE LA PAGE DE L'AGENDA
//TAGS HTML AUTORISES POUR LES INSERTIONS DANS L'AGENDA
$tags="<b>,<strong>,<i>,<em>"; //INTRODUIRE LES TAGS AUTORISES EN LES SEPARANT PAR DES VIRGULES
//POUR INTERDIRE LE HTML REMPLACER LES TAGS PAR UN "0"
//AFFICHAGE DES MENUS SUR LA PAGE D'ACCUEIL DE L'AGENDA
$ajouter="1"; //MENU "AJOUTER UN EVENEMENT" - REMPLACER PAR UN "0" POUR NE PAS AFFICHER CE MENU
$compte="1"; //MENU "DEMANDER UN COMPTE" - REMPLACER PAR UN "0" POUR NE PAS AFFICHER CE MENU
?>
Concernant l'histoire de "register_globals"...il est indiqué sur le site du créateur que ca ne posera pas de problemes, merci quand meme d'avoir réfléchi la dessus.  Message édité par BalooCantalou le 21-02-2005 à 03:47:03
|