Annonce

É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)

flop25
2016-12-06 12:13:04

alors les miniatures ne sont pas migrées du tout et les pwg_high non supprimés (et selon ma recherche les miniatures non plus)
c'est la 122 [Github] Piwigo file install/db/122-database.php@L52 qui change le chemin en renommant et donc écrasant l'ancienne version 'web'/medium par la pwg_high ; elle rempli aussi la taille par la valeur qu'il y a avait pour la pwg_high
par la suite les images retaillées (dont miniatures) sont générées, donc si vous avez comme vous l’indiquiez précédemment

et toutes les vignettes sont remplacées par des icônes génériques. Le code source de la page affiche :
<img src="themes/default/icon/errors_small.png" data-src="i.php?/upload/2015/10/22/20151022120314-ed9c3213-th.jpg" alt="Golf Cup 2015" title="Golf Cup 2015 - -//:---\spam les photos à la racine de cet album">

Après vérification en ftp, il n'existe pas de /upload/2015/10/22/20151022120314-ed9c3213-th.jpg

Par contre les fichiers HD ont été déplacés depuis le dossier /upload/2015/10/22/pwg_high vers le dossier /upload/2015/10/22/

c'est "normal" : la maj c’est bien passée
Ensuite le problème est tout autre et je vous ré invite à lire la FAQ que j'indiquais au début

Si vous avez des images orphelines après coup, ma question première serait de savoir si elle ne l'était pas déjà avant car la maj n’impacte pas la table piwigo_image_category dédié à lier album et images

torode
2016-12-05 21:51:27

Bonsoir Flop,

Ma base image de départ doit être une phpwebgallery 1.4, migrée en 1.7 puis en 2.1.6.
Dans un premier temps, les photos étaient envoyées en ftp dans galleries, puis synchronisées.
Après le passage en 2.1.6, les photos ont été envoyées en http upload (40Go), via l'admin, mais l'historique est resté dans galleries (6Go).
Certains dossiers de galleries sont associés à un dossier virtuel.

Il y avait effectivement un pb de Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE), que j'ai corrigé sur la base.
J'ai aussi nettoyé les tags qui contenaient des " et des apostrophes PHOTO D'EQUIPE (même si l'apostrophe était protégée par un \, j'ai préféré la supprimer).

Je pensais que ce dernier problème était la cause de l'interruption de l'upgrade.

Mais mon souci principal reste la disparition dans le front, des photos représentatives des albums, ainsi que des thumbnails (aucune n'a jamais eu de préfixe TN_) et des plein écrans.

Apparemment, via l'upgrade en http, la migration des images dans la structure propre à Piwigo 2.4+ ne se réalise pas.
Pour info, l'upgrade dure environ 5 secondes.

Raison pour laquelle je posais la question pour savoir s'il est possible de passer les requêtes de modification des tables, d'insertion des tailles des pwg_high dans la table images, directement via phpMyAdmin, ou connecté en ssh, via un source chemin/fichier.sql, puis de lancer un script shell ou autre pour renommer et migrer les photos selon les normes 2.4+

flop25
2016-12-04 21:12:59

attendez... lorsque vous avez fait la maj après conversion de caractères, quel est le problème parce que vous parlez d'images orphelines mais dans votre premier post vous indiquez que les HD sont disponibles
moi je vous ai aidé sur les mises à jour de base de données et les caractères ; maintenant on recentre sur les images, et vous me décrivez les symptômes précisément svp

torode
2016-12-04 18:28:01

Bonjour,

Après de nombreux essais de migration infructueux, j'aimerais tenter une dernière chose avant de laisser tomber.

- Y a t-il un script SQL qui permette de mettre à jour la table images de la base MySQL en v 2.4 ?
C'est à partir de cette upgrade qui s'effectue en 5 secondes via upgrade.php, que je perds toutes mes vignettes, que 2582 photos deviennent orphelines.

D'avance merci pour vos réponses.
Bonne soirée.

torode
2016-11-30 14:34:50

Hello !

Mes tests d'upgrade en 2.8.3 échouent toujours.

Je suis donc reparti de ma base 2.1.6, que j'ai clonée.
J'ai supprimé l'historique, nettoyé les tags, converti les  tables en UTF8, mis à jour en 2.3 standard avec thème non modifié, purgé les tags orphelins, les sessions, les templates compilés...

Je teste toujours...

torode
2016-11-25 15:14:32

Merci pour l'info.

Si cela peut aider quelqu'un, les requêtes MySQL :

ALTER DATABASE 'Nomdelabasededonnées' CHARACTER SET utf8 COLLATE utf8_general_ci;

ALTER TABLE `phpwebgallery_antiaspi_ip_ban` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_caddie` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_categories` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_comments` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_config` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_download_multi` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_favorites` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_groups` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_group_access` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_history` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_history_backup` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_history_summary` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_images` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_image_category` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_image_tag` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_languages` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_old_permalinks` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_plugins` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_rate` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_search` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_sessions` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_sites` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_specific_user_infos` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_tags` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_themes` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_upgrade` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_access` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_cache` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_cache_categories` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_feed` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_group` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_infos` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_mail_notification` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_antiaspi_ip_ban` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_caddie` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_categories` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_comments` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_config` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_download_multi` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_favorites` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_groups` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_group_access` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_history` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_history_backup` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_history_summary` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_images` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_image_category` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_image_tag` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_languages` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_old_permalinks` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_plugins` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_rate` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_search` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_sessions` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_sites` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_specific_user_infos` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_tags` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_themes` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_upgrade` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_access` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_cache` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_cache_categories` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_feed` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_group` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `phpwebgallery_user_infos` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

Remplacer phpwebgallery par le préfixe de vos tables.

J'essaye et je reviens...

flop25
2016-11-25 12:34:52

message maj:
j'ai eu le même cas partant d'une très vielle 1.x

pour être propre il faudrait repartir de la versionn avant maj, puis lancer:
https://stackoverflow.com/questions/100 … ysql-error
puis les maj pwiigo

torode
2016-11-25 11:25:27

Bonjour,

J'ai relancé une MàJ 2.1.6->2.4 en surveillant les logs avec un tail -f
RAS pendant l'upgrade.

Après une synchronisation, je recueille ce genre de message :

[Fri Nov 25 11:02:51.270606 2016] [proxy_fcgi:error] [pid 2266:tid 140005339006720] [client xxx.xxx.xxx.xxx:50113] AH01071: Got error 'TE'\n; in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 770\nPHP message: PHP Warning:  mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 200\nPHP message: PHP Warning:  [mysql error 1267] Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='\n\nSELECT id\n  FROM phpwebgallery_tags\n  WHERE name = '\xc2\x83QUIPE'\n; in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 770\nPHP message: PHP Warning:  mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 200\nPHP message: PHP Warning:  [mysql error 1267] Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='\n\nSELECT id\n  FROM phpwebgallery_tags\n  WHERE name = 'SOLIDARIT\xc2\x83'\n; in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 770\nPHP message: PHP Warning:  mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 200\nPHP message: PHP Warning:  [mysql error 1267] Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='\n\nSELECT id\n  FROM phpwebgallery_tags\n  WHERE name = 'TRAVAIL D\\'\xc2\x83QUIPE'\n; in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 770\nPHP message: PHP Warning:  mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysql.inc.php on line 200\nPHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxx.fr/photos4.xxx.fr/admin/include/functions.php:811) in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/page_header.php on line 105\n', referer: http://photos4.xxx.fr/admin.php?page=si … amp;site=1



J'en déduis que ma base image (au sens large, pas MySQL) dont le contenu a été inséré depuis 10 ans sur une v 1.7, contient des données conflictuelles.
Apparemment du Latin et de l'UTF8 dans les Tags. J'imagine qu'il y en a aussi dans les comments de la table Images.

Existe t-il une commande permettant de convertir le contenu des tags en UTF8 ?

flop25
2016-11-24 18:49:43

et bien il fait connaître son serveur, le monitorer, identifier pourquoi il lache en cours et y remédier. Là on ne peut que tâtonner en attribuant plus de temps d’exécution et de mémoire etc
De mémoire il n'y a pas de migration de miniatures : elles se créent par la suite
les photos perdant le lien... là je ne comprends pas ; comme indiqué depuis le départ il faut être précis
11k photos vous êtes dans une moyenne basse, je vous rassure

torode
2016-11-24 18:09:52

torode a écrit:

Merci !
Côté admin, je retrouve 2582 photos orphelines.

Sur  un autre vhost, j'ai tenté une mise à jour via le plugin en //.

Sur le front, j'ai un message d'erreur, au dessus du contenu : Notice: Undefined index: page_banner in /var/www/vhosts/xxx.fr/photos3.xxx.fr/include/page_header.php on line 43

et toutes les vignettes sont remplacées par des icônes génériques. Le code source de la page affiche :
<img src="themes/default/icon/errors_small.png" data-src="i.php?/upload/2015/10/22/20151022120314-ed9c3213-th.jpg" alt="Golf Cup 2015" title="Golf Cup 2015 - -//:---\spam les photos à la racine de cet album">

Après vérification en ftp, il n'existe pas de /upload/2015/10/22/20151022120314-ed9c3213-th.jpg

Par contre les fichiers HD ont été déplacés depuis le dossier /upload/2015/10/22/pwg_high vers le dossier /upload/2015/10/22/

J'ai ouvert tous les fichiers install/db/xx-database.php, copié les requêtes MySQL pour les passer dans phpMyAdmin.

Le problème principal reste celui des photos qui perdent le lien avec leur catégorie, et la migration incomplète des thumbnails.

Y a t-il des paramètres PHP, Apache ou MySQL à modifier sur le serveur pour que la MàJ s'effectue correctement pour mes 11500 photos ?


Notice: Undefined offset: 5 in /var/www/fr.piwigo.org/forum/include/parser.php on line 551
flop25
2016-11-24 13:09:41

Unknown column 'user_representative_picture_id' in 'field list' c'est la maj 95 ! [Github] Piwigo file install/db/95-database.php elle est référencée dans la table  xx_upgrade ?

torode
2016-11-24 12:55:52

Merci !
J'ai passé la requête :
ALTER TABLE  `phpwebgallery_images` ADD COLUMN `high_width` smallint(9) unsigned default NULL, ADD COLUMN `high_height` smallint(9) unsigned default NULL;

Sinon, je pense effectivement que la base est trop grosse, ou qu'il y a un pb de time out.

J'ai relancé l'upgrade.
Quand j'accède au front end du site j'obtiens ce message :
Notice: Undefined index: nb_image_page in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/section_init.inc.php on line 178


Warning:  [mysql error 1054] Unknown column 'user_representative_picture_id' in 'field list'

SELECT
    c.*,
    user_representative_picture_id,
    nb_images,
    date_last,
    max_date_last,
    count_images,
    nb_categories,
    count_categories
  FROM phpwebgallery_categories c
    INNER JOIN phpwebgallery_user_cache_categories ucc
    ON id = cat_id
    AND user_id = 1
  WHERE id_uppercat is NULL
     
  ORDER BY rank in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysqli.inc.php on line 845


Fatal error: Call to a member function fetch_assoc() on boolean in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysqli.inc.php on line 226


Côté admin, je retrouve 2582 photos orphelines.

Sur  un autre vhost, j'ai tenté une mise à jour via le plugin en //.

Sur le front, j'ai un message d'erreur, au dessus du contenu : Notice: Undefined index: page_banner in /var/www/vhosts/xxx.fr/photos3.xxx.fr/include/page_header.php on line 43

et toutes les vignettes sont remplacées par des icônes génériques. Le code source de la page affiche :
<img src="themes/default/icon/errors_small.png" data-src="i.php?/upload/2015/10/22/20151022120314-ed9c3213-th.jpg" alt="Golf Cup 2015" title="Golf Cup 2015 - -//:---\spam les photos à la racine de cet album">

Après vérification en ftp, il n'existe pas de /upload/2015/10/22/20151022120314-ed9c3213-th.jpg

Par contre les fichiers HD ont été déplacés depuis le dossier /upload/2015/10/22/pwg_high vers le dossier /upload/2015/10/22/


Notice: Undefined offset: 5 in /var/www/fr.piwigo.org/forum/include/parser.php on line 551
flop25
2016-11-24 11:48:59

ha parfait!
donc  Unknown column 'high_width' => il manque cette colonne dans phpwebgallery_images
[Github] Piwigo file install/db/100-database.php pour l'ajouter manuellement en espérant qu'il n'y ait que ça à corriger
mais toute ceci semble dire que le serveur soit apache soit mysql a du mal à tenir dans la durée d'une mise à jour : la maj 2.4 marque une rupture avec le remaniement de la gestion des originaux/HD est ça semble perturber grandement le serveur

torode
2016-11-24 09:38:19

Bonjour,

Oui, c'est le cas.
Apparemment, ce qui bloque c'est le script 122-database.php, celui qui réorganise le contenu de galleries dans upload et insère les détails des pwg_high dans la table images.

Voici la dernière ligne d'erreur dans les logs :

[Thu Nov 24 09:24:33.317530 2016] [proxy_fcgi:error] [pid 2265:tid 140005263472384] [client 80.12.33.27:52765] AH01071: Got error 'PHP message: PHP Warning:  [mysql error 1054] Unknown column 'high_width' in 'field list'\n\nSELECT\n    id,\n    path,\n    tn_ext,\n    has_high,\n    high_filesize,\n    high_width,\n    high_height\n  FROM phpwebgallery_images\n; in /var/www/vhosts/xxx.fr/photos4.xxx.fr/include/dblayer/functions_mysqli.inc.php on line 845\nPHP message: PHP Fatal error:  Call to a member function fetch_assoc() on boolean in /var/www/vhosts/kmsp.fr/photos4.xxx.fr/include/dblayer/functions_mysqli.inc.php on line 226\n', referer: http://photos4.xxx.fr/upgrade.php

ddtddt
2016-11-24 09:13:32

Bonjour,

torode a écrit:

Mon install de départ était une 1.7, avant ma dernière migration en 2.1.6. Les préfixes des tables sont phpwebgallery_. Faut-il commencer par les renommer en piwigo ?

non
par contre dans ton fichier de config il faut bien qu'il y ai phpwebgallery dans le préfixe de table

Pied de page des forums

Propulsé par FluxBB

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