Announcement

#1 2014-03-07 17:41:17

Petter
Member
2011-04-03
30

Error message on my piwigo gallery

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

 

#2 2014-03-07 18:55:03

flop25
Piwigo Team
2006-07-06
7037

Re: Error message on my piwigo gallery

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


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2014-03-07 19:09:44

Petter
Member
2011-04-03
30

Re: Error message on my piwigo gallery

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

 

#4 2014-03-07 20:04:13

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Error message on my piwigo gallery

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

 

#5 2014-03-07 20:48:01

flop25
Piwigo Team
2006-07-06
7037

Re: Error message on my piwigo gallery

and if you use private albums, are they Virtual are from Ftp? Did you uploaded pictures recently in such albums?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#6 2014-03-07 20:50:33

Petter
Member
2011-04-03
30

Re: Error message on my piwigo gallery

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

 

#7 2014-03-07 20:52:34

Petter
Member
2011-04-03
30

Re: Error message on my piwigo gallery

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

 

#8 2014-03-07 22:05:44

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Error message on my piwigo gallery

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

 

#9 2014-03-07 22:29:42

Petter
Member
2011-04-03
30

Re: Error message on my piwigo gallery

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

 

#10 2014-03-07 22:49:54

flop25
Piwigo Team
2006-07-06
7037

Re: Error message on my piwigo gallery

Go directly to admin.php


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2014-03-08 03:29:28

Petter
Member
2011-04-03
30

Re: Error message on my piwigo gallery

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

 

#12 2014-03-08 15:40:54

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13789

Re: Error message on my piwigo gallery

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

 

#13 2014-03-08 16:36:19

Petter
Member
2011-04-03
30

Re: Error message on my piwigo gallery

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

 

#14 2014-03-08 16:49:35

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13789

Re: Error message on my piwigo gallery

The comma is added in function getuserdata (include/functions_user):

Code:

        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

 

#15 2014-03-08 16:55:05

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13789

Re: Error message on my piwigo gallery

and in getuserdata (include/functions_user), after:

$user_cache_cats = get_computed_categories($userdata, null);

in $user_cache_cats, among other, I have:

Code:

    [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

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact