Hello
Hi, i got this error message om my gallery, not quite sure when it show'd up the first time.
How can i fix this, without loosing all my pictures?
Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ic.image_id NOT IN (608,609,610,611,612,613,614,615,616,3276,3277,3278,327' at line 5
SELECT tag_id, COUNT(DISTINCT(it.image_id)) AS counter
FROM piwigo_image_category ic
INNER JOIN piwigo_image_tag it
ON ic.image_id=it.image_id
WHERE (category_id NOT IN (35,126,134,139,141,147,168,169,175,176,178,184,190,195,215,7,31,41,56,112,200,236,240,241,242,) AND ic.image_id NOT IN (608,609,610,611,612,613,614,615,616,3276,3277,3278,3279,3280,3281,3282,3283,3284,3285,3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316))
GROUP BY tag_id
; in /customers/1/e/4/bortne-mathisen.com/httpd.www/galleri/include/dblayer/functions_mysqli.inc.php on line 798
Fatal error: Call to a member function fetch_assoc() on a non-object in /customers/1/e/4/bortne-mathisen.com/httpd.www/galleri/include/dblayer/functions_mysqli.inc.php on line 181
Piwigo version: Not sure. :(
PHP version: PHP Version: 5.3.28
MySQL version: MySQL Database Version: 5.1.72-2, MySQL Client Version: mysqlnd 5.0.8
Piwigo URL: http://http://www.bortne-mathisen.com/galleri/
regards,
Petter
Offline
Hello
could you make a Repair on piwigo tables in the database? Could you also upload by ftp by overwriting existing files, acording to the version you wil found in include/constants.php
Offline
Hi, i see that i have ver. 2.6.1 of Piwigo.
I can upload files by ftp. Is there no danger that I will overwrite important files?
Offline
Also. Can you install rv db integrity and go to admin / Maintenance, click Check database integrity ?
If there is an issue with the database, it will tell you.
PS: I have a feeling we have a tricky bug with private albums. Did you work with permissions / public/private albums recently ?
Offline
and if you use private albums, are they Virtual are from Ftp? Did you uploaded pictures recently in such albums?
Offline
Hi, no work with permissions. This just appers some time after update.
I don’t understand "install rv db integrity".
Ok, Piwigo is downloaded, and ready for upload. This is spooky. :(
Should i upload all Folders and files?
Offline
flop25 wrote:
and if you use private albums, are they Virtual are from Ftp? Did you uploaded pictures recently in such albums?
No, nothing. Just appears some time after update.
Offline
Petter wrote:
Hi, no work with permissions. This just appers some time after update.
I don’t understand "install rv db integrity".
It is a plugin.
Offline
Hello again. Now all files and folders are uploaded, but the error is still the same, no change.
Now I’m really confused.
What can i do now?
PS: I cant install any plugin, all i get is the stupid error message when i try to access the piwigo album.
Last edited by Petter (2014-03-07 22:30:52)
Offline
Go directly to admin.php
Offline
Trying to access admin.php, i got redirected like this: /identification.php?redirect=%252Fgalleri%252Fadmin.php
And the same error message.
Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ic.image_id NOT IN (608,609,610,611,612,613,614,615,616,3276,3277,3278,327' at line 5
SELECT tag_id, COUNT(DISTINCT(it.image_id)) AS counter
FROM piwigo_image_category ic
INNER JOIN piwigo_image_tag it
ON ic.image_id=it.image_id
WHERE (category_id NOT IN (35,126,134,139,141,147,168,169,175,176,178,184,190,195,215,7,31,41,56,112,200,236,240,241,242,) AND ic.image_id NOT IN (608,609,610,611,612,613,614,615,616,3276,3277,3278,3279,3280,3281,3282,3283,3284,3285,3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316))
GROUP BY tag_id
; in /customers/1/e/4/bortne-mathisen.com/httpd.www/galleri/include/dblayer/functions_mysqli.inc.php on line 798
Fatal error: Call to a member function fetch_assoc() on a non-object in /customers/1/e/4/bortne-mathisen.com/httpd.www/galleri/include/dblayer/functions_mysqli.inc.php on line 181
Offline
I have a the same problem on a Piwigo.com account. In piwigo_user_cache.forbidden_categories I have:
8,9,...,86,
The problem is the last comma. I don't know where it comes from.
Offline
hmm, i see. This line:
WHERE (category_id NOT IN (35,126,134,139,141,147,168,169,175,176,178,184,190,195,215,7,31,41,56,112,200,236,240,241,242,)
It's ending with a single , at the end. Could that be it??
I guess that this is not coming from any file, maybe it's a error in one of the tables.
I have looked in piwigo_categories table, but i have no idè what to look for. (just a green noob)
(Have access to phpMyAdmin)
Any clues?
Offline
The comma is added in function getuserdata (include/functions_user):
if ( !empty($forbidden_ids) ) { if ( empty($userdata['forbidden_categories']) ) { $userdata['forbidden_categories'] = implode(',', $forbidden_ids); } else { $userdata['forbidden_categories'] .= ','.implode(',', $forbidden_ids); } }
in the "else", implode(',', $forbidden_ids) equals "86,122," in my case.
But when we execute this function the first time, it calls get_computed_categories (include/functions_category) and I have a few warnings:
Notice: Undefined index: nb_categories in include/functions_category.inc.php on line 542
Notice: Undefined index: count_images in include/functions_category.inc.php on line 546
Notice: Undefined index: count_categories in include/functions_category.inc.php on line 547
Notice: Undefined index: id_uppercat in include/functions_category.inc.php on line 593
Notice: Undefined index: cat_id in include/functions_user.inc.php on line 456
Notice: Undefined index: id_uppercat in include/functions_category.inc.php on line 583
Notice: Undefined index: cat_id in include/functions_category.inc.php on line 602
Offline
and in getuserdata (include/functions_user), after:
$user_cache_cats = get_computed_categories($userdata, null);
in $user_cache_cats, among other, I have:
[0] => Array ( [nb_categories] => 1 [count_images] => 0 [count_categories] => 1 [max_date_last] => )
Which explains why we have an empty value.
Investigation in progress.
Offline