Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Lots of entries in database.log file  (Read 3125 times)

0 Members and 1 Guest are viewing this topic.

sharpo

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 332
Lots of entries in database.log file
« on: November 23, 2010, 12:17:18 am »

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?
Logged
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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Lots of entries in database.log file
« Reply #1 on: November 23, 2010, 10:40:33 am »

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.
Logged

sharpo

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 332
Re: Lots of entries in database.log file
« Reply #2 on: November 23, 2010, 12:53:19 pm »

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?
Logged
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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Lots of entries in database.log file
« Reply #3 on: November 23, 2010, 02:10:30 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.


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


Is there anything I should be doing to correct this problem?
The log entries themselves are no problem.
Logged

sharpo

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 332
Re: Lots of entries in database.log file
« Reply #4 on: November 25, 2010, 12:06:55 am »

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.
Logged
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
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.