forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: aemer on March 01, 2004, 09:49:16 am

Title: Critical Fault when get back to index
Post by: aemer on March 01, 2004, 09:49:16 am
Well i came along a new problem. I made categories on my main page "www.bigpartypics.ch/cpg".

The problem is: when i click on an album, everything is fine and i can browse pics. but when i click on "alben-übersicht" which is albums overview, it shoud show the index (/cpg) but i get an critical error "There was an error while processing a database query". and ist shows me "http://bigpartypics.ch/cpg/index.php?cat=6" in the address line of internet explorer. Any solution?

Very appreciated, thx!
Title: Critical Fault when get back to index
Post by: Joachim Müller on March 01, 2004, 10:40:08 am
when encountering a error saying
Quote
There was an error while processing a database query
, you should enable debug mode (in coppermine config at the very bottom) and check the additional output (it will tell you on which query the error occured).

GauGau
Title: Critical Fault when get back to index
Post by: aemer on March 01, 2004, 12:30:54 pm
hey thx for the quick answer gaugau. when i activate debug mode i get a whole load of stuff.. bud sadly i dont understand it.. the error which i described is this:

Code: [Select]
While executing query "SELECT c.pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, msg_id, author_id, msg_author, UNIX_TIMESTAMP(msg_date) as msg_date, msg_body, aid FROM cpg11d_comments as c, cpg11d_pictures as p WHERE approved = 'YES' AND c.pid = p.pid AND cpg11d_pictures.aid IN (15,13,14,16)  ORDER by msg_id DESC  LIMIT 0 ,4" on 0

mySQL error: Unknown table 'cpg11d_pictures' in where clause

and its in this file:
Code: [Select]
Datei: ...cpg/include/functions.inc.php - Zeile: 105


but on every page i get some errors(which i guess didnt affect the functionality yet) for example on the index page i get this:
Code: [Select]
Notice: Undefined offset: 2 in /home/www/web409/html/cpg/index.php on line 555

Notice: Undefined index: user_id in /home/www/web409/html/cpg/include/functions.inc.php on line 772

Notice: Undefined index: user_id in /home/www/web409/html/cpg/include/functions.inc.php on line 772

Notice: Undefined index: user_id in /home/www/web409/html/cpg/include/functions.inc.php on line 772

Notice: Undefined index: user_id in /home/www/web409/html/cpg/include/functions.inc.php on line 772


is this an important error?

Thanks for help!
Title: Critical Fault when get back to index
Post by: Joachim Müller on March 01, 2004, 08:12:18 pm
ignore the notices, only the warnings and errors are relevant. Where do you have this code from? Did you modify anything in /include/functions.inc.php? Doesn't look very familiar to me...
Maybe you could a fresh copy of the file and overwrite the existing one on the server, just to be sure.

GauGau
Title: Critical Fault when get back to index
Post by: aemer on March 02, 2004, 09:04:47 am
hm strange. well i followed your hint and i downloaded coppermine again, and overwrote the functions.inc.php on my server. still get the same error... it has sumting to do that it doesnt redirect correctly. i guess i got this problem since i use categories! it sould diredt me to index.php i guess (at least this would work) but as said it directs me to index.php?cat=6 and i dunno where that cat=6 cames form and for what it sould be..

i played a liltte and found out if i click on an album in antother categorie it rederiects me to like index.php?cat=4 so i really guess this is a problem with the categories.

you know what the problem is? or you need any more infos? i hope you can help, thank you very much!
Title: Critical Fault when get back to index
Post by: Casper on March 02, 2004, 11:48:46 am
The cats are correct.  The 'album list' link from the album page takes you to the category page which that album is in.

Try uploading a fresh copy of displayimage.php and thumbnails.php. as one of these may have become corrupted.
Title: Critical Fault when get back to index
Post by: aemer on March 02, 2004, 12:32:52 pm
i followed your odrder casper but this dint help, still same problem :( any other suggestions please?!
Title: Critical Fault when get back to index
Post by: aemer on March 03, 2004, 03:33:02 pm
i found sumthing out that maybe helps...

the link just doesnt work when its for example called :

Code: [Select]
http://www.bigpartypics.ch/cpg/index.php?cat=6

but when you write sumthing else than cat, for ex

Code: [Select]
http://www.bigpartypics.ch/cpg/index.php?anything=6

it works again. is this maybe a problem with the languaga? (that i use german and not english) or is it just a code problem? would be great if there was a solution.. otherwise i guess i have to take out categories which would pretty suck cuz i like them.

btw. does anybody else get thsi problem or is it just me?

thx
Title: Critical Fault when get back to index
Post by: Casper on March 03, 2004, 03:47:11 pm
This is not caused by your language file, or your theme, I tried and it does not work in default theme or english language.

I think it may be a problem with your categories table.  Use your database tool, such as phpMyAdmin, to check the table.
Title: It's the query, definitely
Post by: aemer on March 05, 2004, 08:57:13 am
Hi guys

Found the error in the sql statement above:

This:
Code: [Select]
AND c.pid = p.pid AND cpg11d_pictures.aid IN (15,13,14,16)  ORDER by

should read like this
Code: [Select]
AND c.pid = p.pid AND p.aid IN (15,13,14,16)  ORDER by

Then it works (controlled in phpMyAdmin).

Any hints where this statement is hidden in the coppermine code. Can't find it.

THX
Title: Critical Fault when get back to index
Post by: aemer on March 11, 2004, 08:35:29 am
doesnt anybody got an answer? its pretty important!! Thanks!
Title: Critical Fault when get back to index
Post by: aemer on March 25, 2004, 07:21:12 pm
hey im sorry to post again, but i didnt get an answer on this for a looong time.. cant anybody help me please? i would be so thankful!
Title: Critical Fault when get back to index
Post by: Joachim Müller on March 26, 2004, 06:44:26 am
queries are built dynamically in coppermine, that's why you can't do a search for the query in the coppermine code. You'll have to give us a hint on what exact page the query exists (deep link).

GauGau

P.S. If you haven't got an answer after some days to your question, you should reply *bump*.
Title: Critical Fault when get back to index
Post by: aemer on April 03, 2004, 11:02:18 am
hm well i dunno exactly what you mean with deep link but i try to give you as much information as i can (if you need to know more, im better in talkin german ;)) well the error occurs every time im in an album and wanna go back to index. if you click on any album on http://bigpartypics.ch/cpg/ and then wanna go back to index (alben übersicht) it gives a wrong url like (http://bigpartypics.ch/cpg/index.php?cat=7) well the (cat=7) doesnt work. if you write like (kat=7) or (anything) it works. so there there just souldnt stand cat=7.

so when im in an album and wanna go back to index over (albem übersicht) i get this error :

Quote
While executing query "SELECT c.pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, msg_id, author_id, msg_author, UNIX_TIMESTAMP(msg_date) as msg_date, msg_body, aid FROM cpg11d_comments as c, cpg11d_pictures as p WHERE approved = 'YES' AND c.pid = p.pid AND cpg11d_pictures.aid IN (17,18)  ORDER by msg_id DESC  LIMIT 0 ,4" on 0
in this
Code: [Select]
Datei: /home/www/web409/html/cpg/include/functions.inc.php - Zeile: 105

line 105 in my functions.inc.php reads like this :
Code: [Select]
cpg_die(CRITICAL_ERROR, $out, __FILE__, __LINE__);

debug info reads like this:
Code: [Select]
USER:
Array
(
    [ID] => d334b713eba57e5e1ee88f56324e83a8
    [am] => 1
    [liv] => Array
        (
            [0] => 601
            [1] => 386
        )

)

 
 
USER DATA:
Array
(
    [0] => 2
    [user_id] => 2
    [1] => admin
    [user_name] => admin
    [2] => 1
    [user_level] => 1
    [group_quota] => 0
    [can_rate_pictures] => 3
    [can_send_ecards] => 3
    [can_post_comments] => 3
    [can_upload_pictures] => 1
    [can_create_albums] => 2
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
)

 
 
Queries:
Array
(
    [0] => SELECT user_id, username as user_name, user_level FROM `usr_web409_4`.phpbb_users WHERE user_id='2' AND user_password='9094a8358ac47c1d4a3d6b32bc057c9a'
    [1] => SELECT (ug.group_id + 5) as group_id FROM `usr_web409_4`.phpbb_user_group as ug LEFT JOIN `usr_web409_4`.phpbb_groups as g ON ug.group_id = g.group_id WHERE user_id = 2 AND user_pending = 0 AND group_single_user = 0
    [2] => SELECT  group_quota as gq,                 can_rate_pictures as crp,                 can_send_ecards as cse,                 can_post_comments as cpc,                 can_upload_pictures as cup,                 can_create_albums as cca,                 pub_upl_need_approval as puna,                 priv_upl_need_approval as pruna FROM cpg11d_usergroups WHERE group_id IN (1,2,8)
    [3] => DELETE FROM cpg11d_banned WHERE expiry < 1080982752
    [4] => SELECT * FROM cpg11d_banned WHERE ip_addr='81.62.183.74' OR ip_addr='81.62.183.74' OR user_id=2
    [5] => SELECT name, parent FROM cpg11d_categories WHERE cid = '7'
    [6] => SELECT cid, name, description FROM cpg11d_categories WHERE parent = '7'  ORDER BY pos
    [7] => SELECT aid FROM cpg11d_albums WHERE category = '7'
    [8] => SELECT COUNT(*) from cpg11d_pictures WHERE approved = 'YES' AND cpg11d_pictures.aid IN (17,18)
    [9] => SELECT *,cpg11d_albums.title AS title,cpg11d_albums.aid AS aid  FROM cpg11d_pictures,cpg11d_albums WHERE cpg11d_pictures.aid = cpg11d_albums.aid AND approved = 'YES' AND cpg11d_pictures.aid IN (17,18)  GROUP  BY cpg11d_pictures.aid ORDER BY cpg11d_pictures.ctime DESC  LIMIT 0 ,4
    [10] => SELECT count(*) FROM cpg11d_albums WHERE category = '7'
    [11] => SELECT a.aid, a.title, a.description, visibility, filepath,                 filename, url_prefix, pwidth, pheight FROM cpg11d_albums as a LEFT JOIN cpg11d_pictures as p ON thumb=pid WHERE category = '7' ORDER BY mtime LIMIT 0,2
    [12] => SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload FROM cpg11d_pictures WHERE aid IN (17, 18) AND approved = 'YES' GROUP BY aid
    [13] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg11d_pictures WHERE pid='649'
    [14] => SELECT COUNT(*) from cpg11d_comments, cpg11d_pictures  WHERE approved = 'YES' AND cpg11d_comments.pid = cpg11d_pictures.pid AND cpg11d_pictures.aid IN (17,18)
    [15] => SELECT c.pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, msg_id, author_id, msg_author, UNIX_TIMESTAMP(msg_date) as msg_date, msg_body, aid FROM cpg11d_comments as c, cpg11d_pictures as p WHERE approved = 'YES' AND c.pid = p.pid AND cpg11d_pictures.aid IN (17,18)  ORDER by msg_id DESC  LIMIT 0 ,4
)

 
GET :
Array
(
    [cat] => 7
)

 
POST :
Array
(
)
 



does this help you or do you need any other information?

thank you very much!!
Title: Critical Fault when get back to index
Post by: Joachim Müller on April 03, 2004, 01:38:55 pm
ah, I see. I think there have been reports on this happening, but I don't recall the thread or the answer how to solve this. Maybe a search on this board might help.

You might also want to consider to upgrade to cpg1.3.0, which is still in beta status, but at least the front-end your users will see should be pretty stable and safe to use (backup your data before of course).

GauGau