Lots of entries in database.log file Lots of entries in database.log file
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Lots of entries in database.log file

Started by sharpo, November 23, 2010, 12:17:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sharpo

http://www.sharpos-world.co.uk/cpg/index.php

The gallery was updated to 1.5.8 about a week ago. I'm not getting any error messages as I browse the gallery, but when I checked my backup files the only one that didn't match was the database.log file - there was a big difference in size. Looking at the file there have been many entries added since the upgrade.

Tried searching for answers but no success so far. Ran a "repair" on the database earlier this evening, just to see if that helped, but have had 2 more entries since then, as follows:-


Nov 22, 2010 at 08:34 PM - While executing query 'SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id
                FROM cpg143_pictures AS r
                INNER JOIN cpg143_albums AS a ON a.aid = r.aid
                WHERE (r.aid = 437) AND (1 OR keywords like '%/qm%') AND r.aid NOT IN (90, 100, 280, 308, 642, 643)
                AND approved = 'YES'
                AND hits > 0
                ORDER BY hits ASC, pid DESC
                 LIMIT 0 ,-320' in include/functions.inc.php on line 1600 the following error was encountered:
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 '-320' at line 8
---
Nov 22, 2010 at 08:51 PM - While executing query 'SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id
                FROM cpg143_pictures AS r
                INNER JOIN cpg143_albums AS a ON a.aid = r.aid
                INNER JOIN cpg143_categories AS c2 ON c2.cid = category WHERE (c2.lft BETWEEN 1 AND 2) AND r.aid NOT IN (90, 100, 280, 308, 642, 643)
                AND approved = 'YES'
                AND hits > 0
                ORDER BY hits ASC, pid DESC
                 LIMIT 0 ,-631' in include/functions.inc.php on line 1600 the following error was encountered:
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 '-631' at line 8
---



Had a look at functions.inc.php line 1600:-

  $result = cpg_db_query($query);

Any ideas please?
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Αndré

Just made some tests. It happens if someone tries to access a page that doesn't exist. In your case it's the most viewed meta album.

Example: your last page is http://www.sharpos-world.co.uk/cpg/thumbnails.php?album=topn&cat=0&page=859
If someone now tries to access page 860 or higher, a critical error message appears and a new log entry is written. I just tested it with page 888, so you should have at least one new entry in your log file.

sharpo

Thanks for checking Andre, there are quite a few new entries in the log since yesterday.

I've been trying to understand exactly what "meta albums" are and why anybody would try to access above page 859, if that is the last page of al the "most viewed" of the thumbnails. I tried a search of the 1.5.8 docs for "meta album" and kept ending up at the main page again (documentation problem?)

http://www.google.com/cse?cx=009353514429642786404%3Akeefjtiy3lo&q=meta&sa=search+docs&siteurl=documentation.coppermine-gallery.net%2Fen%2F

The first result shown just goes back to main documentation page.

Getting back to "meta albums" and entries in the log file, is this something everybody will have in their logs? I haven't altered 1.5.8 in any way, other than a few amendments to a custom theme. I know I have many albums that only contain "linked" files and that "most viewed" request will show "no image to display". Is this an expected result?

Is there anything I should be doing to correct this problem?
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Αndré

Quote from: sharpo on November 23, 2010, 12:53:19 PM
entries in the log file, is this something everybody will have in their logs?
Yes. All database erros are stored in that log file.


Quote from: sharpo on November 23, 2010, 12:53:19 PM
I know I have many albums that only contain "linked" files and that "most viewed" request will show "no image to display". Is this an expected result?
That's another issue, so please don't discuss it in this thread. The 'most viewed' meta album works imo: http://www.sharpos-world.co.uk/cpg/thumbnails.php?album=topn


Quote from: sharpo on November 23, 2010, 12:53:19 PM
Is there anything I should be doing to correct this problem?
The log entries themselves are no problem.

sharpo

I'll mark this as solved, as it does not appear to be causing me any problems.

Over the coming weeks I'll keep a check on the entries in the log, not that I understand them all. During the last 24 hours another 31 entries were added to database.log and the size of it has grown to 196kb in about 2 weeks, but I can always remove the older entries if the file size does become excessive.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25