Écrire une réponse

Veuillez écrire votre message et l'envoyer

Cliquez dans la zone sombre de l'image pour envoyer votre message.

Retour

Résumé de la discussion (messages les plus récents en premier)

Kervinou
2007-02-11 15:13:58

En cliquant plusieurs fois sur "catégories", au bout quelques essais on arrive avec en haut de page

Code:

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT name,id,date_last,nb_images,global_rank
  FROM phpwebgallery_categories
  WHERE 1 = 1
    AND (id_uppercat is NULL)
    AND id NOT IN (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,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,70,71,72,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,108,109,110,111,112,113,118,119,120,121,122,123,224,125,225,127,128,129,130,131,132,133,134,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,262,153,154,155,156,157,158,159,160,161,163,164,191,165,166,167,168,169,170,171,172,173,223,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,192,193,230,229,228,196,198,199,200,227,201,202,203,204,205,206,207,208,209,210,261,211,212,213,214,215,216,217,226,219,220,221,222,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,263,264,265,266,268,269,270,271,272,278,279,280,281,282,283,284,285,286,287,289,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306)
;
[mysql error ] 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions_category.inc.php on line 83

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT id, name, date_last, representative_picture_id, comment, nb_images
  FROM phpwebgallery_categories
  WHERE id_uppercat is NULL
    AND id NOT IN (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,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,70,71,72,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,108,109,110,111,112,113,118,119,120,121,122,123,224,125,225,127,128,129,130,131,132,133,134,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,262,153,154,155,156,157,158,159,160,161,163,164,191,165,166,167,168,169,170,171,172,173,223,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,192,193,230,229,228,196,198,199,200,227,201,202,203,204,205,206,207,208,209,210,261,211,212,213,214,215,216,217,226,219,220,221,222,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,263,264,265,266,268,269,270,271,272,278,279,280,281,282,283,284,285,286,287,289,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306)
  ORDER BY rank
;
[mysql error ] 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/category_subcats.inc.php on line 49

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

INSERT INTO phpwebgallery_history
  (date,login,IP,file,category,picture)
  VALUES
  (NOW(),
  'dd',
  '82.67.248.235',
  'category',
  'Accueil',
  '')
;
[mysql error ] 

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT mail_address
  FROM phpwebgallery_users
  WHERE id = 1
;
[mysql error ] 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 906

et dans le bas de la page, cad en dessous de tout


Code:

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

UPDATE phpwebgallery_sessions
  SET expiration = now(),
  data = 'pwg_uid|s:2:"32";'
  WHERE id = '5cfa5ff68b964140ee60940856617b60'
;
[mysql error ] 

Warning: mysql_affected_rows() [function.mysql-affected-rows]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions_session.inc.php on line 178

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions_session.inc.php on line 187

Surement, le double connect voir même triple car les deux visite.php (le 1 et le 2) utilisent le connect BDD

Kervinou
2007-02-11 15:10:05

Bon j'ai remis dans le menubar.inc.php

au moins, ca marche.
mais souvent quand "JE" suis connecté, il enregistre deux fois mon IP avec un chiffre en + et du coup, ma connexion est compter comme 2

Kervinou
2007-02-11 14:50:39

Bon j'ai tenté un autre truc, j'ai ajouté au début de la page_tail.php


Code:

include(PHPWG_ROOT_PATH.'visite/visite.php');

$template->set_filenames(
  array(
    'menubar' => 'menubar.tpl',
  )
);

$template->assign_vars(
  array(
    'U_VCOMPTEUR'=> $compteur,
    'U_VCOMPTEUR_I'=> $compteur_i,
    'U_VCOMPTEUR_C'=> $compteur_c,
  )
);

mais ca donne rien ! ;)

Kervinou
2007-02-11 14:35:39

Mais effectivement pour la connexion, dans le "connect" j'ai çà

    $db=mysql_connect($mysql_host,$mysql_login,$mysql_pass);
    mysql_select_db($mysql_dbnom,$db);


Tu crois qu'on pourrait utiliser la connexion des pages php de pwg en une seule fois ?!

Car de mémoire en php/bdd comme en http, les connexions ne sont pas persistantes

Kervinou
2007-02-11 14:28:06

!! Effectivement, le "visite" se connecte aussi à la BDD, mais si c'était le cas, surement que le problème se produirait à chaque affichage de la page et ce n'est pas le cas.

pour avoir les variables dans le menubar, j'ai modifié comme cela le menubar.inc.php
Peut etre aurais-je du  mettre cela ailleurs ?!

------------------------------------------------------------------------------------------------------------------------------

Code:

include(PHPWG_ROOT_PATH.'visite/visite.php');

$template->set_filenames(
  array(
    'menubar' => 'menubar.tpl',
    )
  );

$template->assign_vars(
  array(
    'NB_PICTURE' => $user['nb_total_images'],
    'USERNAME' => $user['username'],
    'MENU_CATEGORIES_CONTENT' => get_categories_menu(),
    'F_IDENTIFY' => get_root_url().'identification.php',
    'U_HOME' => make_index_url(),
    'U_REGISTER' => get_root_url().'register.php',
    'U_LOST_PASSWORD' => get_root_url().'password.php',
    'U_LOGOUT' => get_root_url().'?act=logout',
    'U_ADMIN'=> get_root_url().'admin.php',
    'U_PROFILE'=> get_root_url().'profile.php',
    'U_VCOMPTEUR'=> $compteur,
    'U_VCOMPTEUR_I'=> $compteur_i,
    'U_VCOMPTEUR_C'=> $compteur_c,
    )
  );

------------------------------------------------------------------------------------------------------------------------------



L'erreur vient de se reproduire et ce ne sont pas les mêmes messages qui apparaissent...



------------------------------------------------------------------------------------------------------------------------------

Code:

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT name,id,date_last,nb_images,global_rank
  FROM phpwebgallery_categories
  WHERE 1 = 1
    AND (id_uppercat is NULL)
    AND id NOT IN (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,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,70,71,72,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,113,118,224,225,223,230,229,228,227,226,231,232,233,248,249,250,251,252,253,254,255,256,268,269,270,271,272,279,280,283,284,290,291,292,293,294,297,298,299,300,305)
;
[mysql error ] 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions_category.inc.php on line 83

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT id, name, date_last, representative_picture_id, comment, nb_images
  FROM phpwebgallery_categories
  WHERE id_uppercat is NULL
    AND id NOT IN (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,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,70,71,72,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,113,118,224,225,223,230,229,228,227,226,231,232,233,248,249,250,251,252,253,254,255,256,268,269,270,271,272,279,280,283,284,290,291,292,293,294,297,298,299,300,305)
  ORDER BY rank
;
[mysql error ] 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/category_subcats.inc.php on line 49

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT mail_address
  FROM phpwebgallery_users
  WHERE id = 1
;
[mysql error ] 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 906
VDigital
2007-02-11 13:06:57

A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

Le connect n'a pas été réalisé.
Tu n'aurais pas essayé de faire un second connect MySQL dans le source de visite.php.
8-)

Kervinou
2007-02-11 12:45:34

Voici les erreurs qui s'affichent de tps en tps en haut de page..

De fait, aucun catégorie n'est listée et il faut recliquer sur catégories pour aller loin...
Vu que ca ne le fait pas tout le tps, je pense que ca doit être un problème d'échange de données ou réseau, je ne vois pas trop autre chose...
???




------------------------------------------------------------------------------------------------------------------------------------------------------------------
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT name,id,date_last,nb_images,global_rank
  FROM phpwebgallery_categories
  WHERE 1 = 1
    AND (id_uppercat is NULL)
    AND id NOT IN (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,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,70,71,72,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,108,109,110,111,112,119,120,121,122,123,224,125,225,127,128,129,130,131,132,133,134,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,262,153,154,155,156,157,158,159,160,161,163,164,191,165,166,167,168,169,170,171,172,173,223,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,192,193,230,229,228,196,198,199,200,227,201,202,203,204,205,206,207,208,209,210,261,211,212,213,214,215,216,217,226,219,220,221,222,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,263,264,265,266,278,273,274,275,276,277,279,280,281,282,283,284,285,286,287,290,289,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306)
;
[mysql error ]

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions_category.inc.php on line 83

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

SELECT id, name, date_last, representative_picture_id, comment, nb_images
  FROM phpwebgallery_categories
  WHERE id_uppercat is NULL
    AND id NOT IN (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,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,70,71,72,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,108,109,110,111,112,119,120,121,122,123,224,125,225,127,128,129,130,131,132,133,134,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,262,153,154,155,156,157,158,159,160,161,163,164,191,165,166,167,168,169,170,171,172,173,223,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,192,193,230,229,228,196,198,199,200,227,201,202,203,204,205,206,207,208,209,210,261,211,212,213,214,215,216,217,226,219,220,221,222,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,263,264,265,266,278,273,274,275,276,277,279,280,281,282,283,284,285,286,287,290,289,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306)
  ORDER BY rank
;
[mysql error ]

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/139/sdc/5/1/galerie.kerv.org/include/category_subcats.inc.php on line 49

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/139/sdc/5/1/galerie.kerv.org/include/functions.inc.php on line 502

INSERT INTO phpwebgallery_history
  (date,login,IP,file,category,picture)
  VALUES
  (NOW(),
  'guest',
  '82.67.000.000',
  'category',
  'Accueil',
  '')
;
[mysql error ]
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Kervinou
2007-02-11 11:52:07

Bon j'ai bidouillé le source du visite.php
je crois que ca va le faire ;-)

Kervinou
2007-02-11 11:26:14

pis j'ai des erreurs bizarre de tps en tps sur tout l'écran !

Kervinou
2007-02-11 11:09:24

Mouais, ca un truc qui déconne qd même...
je n'ai pas les bons chiffres sur 2 des 3 variables ! :-(

Kervinou
2007-02-11 11:06:03

Ok
Après une semaine de recherche et de tatonnement, j'ai trouvé ! -;)
++

Kervinou
2007-02-11 10:58:23

J'ai mis le include dans le page_tail + un bloc avec les variables dans le menubar.tpl
J'ai aussi essayé de mettre le include un peu partout, mais ca change rien ;)

Y'a t-il quelque chose à changer dans le source du visite.php ?
Je ne pense pas !

Kervinou
2007-02-09 19:40:26

dommage ;)
je ne sais pas comment récupérer les variables ? :)

j'ai mis le include dans le page_tail, ok y'a pas d'erreur ;-)

Kervinou
2007-02-09 11:14:08

Voici donc l'explication ! ;-)

Ok, pour le NOPHP dans les TPL...
Je regarderai le ./page_tail.php ce soir et pas de print et sans balises bien sur.

Effectivement, un bloc de variable sera propre, bon je chercherai de ce coté ce soir, si pas de news de ma part bientôt, c'est que je me serai jeté par la fenêtre ;-))))

Si j'y arrives, j'essayerai de faire un récap des modifs effectuée ici.
D'ailleurs, à ce sujet, peut etre en parler à l'auteur ?! Car si on intègre son code dans une autre appli d'une manière publique,
je crois que ce serait la moindre des choses ! ;-)

++


ps: J'adore ton "Trop facile" ! -;)
Ps2: Je ne suis pas développeur, juste amateur et bidouilleur...
ps3: T'as vu mes modifs de pres sur la galerie, ca fait plus joli ;) j'ai aussi diminuer la taille de la police du menubar !

VDigital
2007-02-09 06:34:33

On ne peut pas mettre du code php dans un tpl d'accord?

On peut mettre ça dans un ./include/page_tail.php
mais sans les balises puisque qu'on sera dans du php.
On ne fera pas de print mais on créera un block de variable.
Bloc qui sera placé adroitement dans footer.tpl

Si ce n'est pas assez clair pour tout le monde...
Certains en feront un MOD pour la 1.6.2
Ou même bien mieux et plus simple un plugin de la 1.7
Trop facile.
8-)

Pied de page des forums

Propulsé par FluxBB

github twitter newsletter Faire un don Piwigo.org © 2002-2024 · Contact