erroro messages database erroro messages database
 

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]

Main Menu

erroro messages database

Started by axial63, December 17, 2018, 10:22:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

axial63

Hello,
after a long weekend downloading files and new-installing cpg i still recive errors in the logfiles.

That also accours after manualy upgrading cpg1.5.46, the upgrade with the released installer_stub evrytime went wrong...

To be sure the error was in the programm i did a new install this weekend.

The error messages are:

QuoteDec 17, 2018 at 06:24 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 cpg16x_pictures AS r
INNER JOIN cpg16x_albums AS a ON a.aid = r.aid
WHERE (1)
AND approved = 'YES'
ORDER BY ctime ASC, pid ASC
LIMIT 0 ,-4886' in include/functions.inc.php on line 1626 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-4886' at line 7
3x

QuoteDec 17, 2018 at 08:28 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 cpg16x_pictures AS r
INNER JOIN cpg16x_albums AS a ON a.aid = r.aid
WHERE (1)
AND r.owner_id = '3'
AND approved = 'YES'
ORDER BY ctime ASC, pid ASC
LIMIT 0 ,-6114' in include/functions.inc.php on line 1682 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-6114' at line 8
3x

QuoteDec 17, 2018 at 08:11 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 cpg16x_pictures AS r
INNER JOIN cpg16x_albums AS a ON a.aid = r.aid
WHERE (r.aid = 206)
AND approved = 'YES'
AND hits > 0
ORDER BY hits ASC, pid DESC
LIMIT 0 ,-20' in include/functions.inc.php on line 1730 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-20' at line 8
1x

QuoteDec 17, 2018 at 04:42 PM - While executing query 'SELECT cid FROM cpg16x_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 49 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND' at line 1
100x

Quote
31 // only add when we are at the top level, cat == 0
32 function get_meta_album_set($cat)
33 {
34     global $CONFIG, $lft, $rgt, $RESTRICTEDWHERE, $FORBIDDEN_SET_DATA, $CURRENT_ALBUM_KEYWORD, $CURRENT_CAT_DEPTH;
35     if ($cat == USER_GAL_CAT) {
36         $RESTRICTEDWHERE   = "WHERE (category > " . FIRST_USER_CAT;
37         $CURRENT_CAT_DEPTH = -1;
38
39     } elseif ($cat > FIRST_USER_CAT) {
40        $RESTRICTEDWHERE   = "WHERE (category = $cat";
41        $CURRENT_CAT_DEPTH = -1;
42
43    } elseif ($cat > 0) {
44        $result = cpg_db_query("SELECT rgt, lft, depth FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = $cat LIMIT 1");
45        list($rgt, $lft, $CURRENT_CAT_DEPTH) = $result->fetchRow(true);
46        $RESTRICTEDWHERE = "INNER JOIN {$CONFIG['TABLE_CATEGORIES']} AS c2 ON c2.cid = category WHERE (c2.lft BETWEEN $lft AND $rgt";
47
48        if (empty($CURRENT_ALBUM_KEYWORD)) {
49            $result = cpg_db_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']} WHERE lft BETWEEN $lft AND $rgt");
50            $categories = array();
51            while($row = $result->fetchAssoc()) {
52                $categories[] = $row['cid'];
53            }
54            $result->free();
55            $categories = implode(', ', $categories);
56
57            $result = cpg_db_query("SELECT keyword FROM {$CONFIG['TABLE_ALBUMS']} WHERE category IN ($categories)");
58            if ($result->numRows() > 0) {
59                $CURRENT_ALBUM_KEYWORD = array();
60                while($row = $result->fetchAssoc()) {
61                    if(!empty($row['keyword'])) {
62                        $CURRENT_ALBUM_KEYWORD[] = $row['keyword'];
63                    }
64                }
65            }
66            $result->free();
67        }
functions.inc.php

I'm out off resorses: HELP :)


ron4mac

Have you ran the update file? ( http://<your site>/update.php )

axial63

Hello Ron,

thank  you for the reply.

Ofcourse i did ran the update.php file and the option: update database... Multiple times...   :o

But hee, what the hack, i run it again...   8)

Also ran: Version Check: Came out: OK V

Errors i find at this moment:

Quote
Dec 18, 2018 at 12:47 PM - While executing query 'SELECT cid FROM cpg16x_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 49 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND' at line 1

QuoteDec 18, 2018 at 12:48 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 cpg16x_pictures AS r
INNER JOIN cpg16x_albums AS a ON a.aid = r.aid
WHERE (r.aid = 209)
AND approved = 'YES'
ORDER BY ctime ASC, pid ASC
LIMIT 0 ,-60' in include/functions.inc.php on line 1626 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-60' at line 7

QuoteDec 18, 2018 at 12:48 PM - While executing query 'SELECT cid FROM cpg16x_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 49 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND' at line 1

axial63

Debugger is now on 'normal'

messages:
Quote/include/init.inc.php
Notice line 195: Undefined index: log_retention
in every screen

Quote/include/logger.inc.php
Warning line 77: file_get_contents(logs/hupload.log.php): failed to open stream: No such file or directory
only whyle visiting log_file : h5upload

axial63

Still get messages that logfiles don't exist or can't be found.

1. when i try to open the index.html logfile
Quote
Logs :: indexhtml

Debug-information 

Messages

/include/init.inc.php
Notice line 195: Undefined index: log_retention

/include/logger.inc.php
Warning line 77: file_get_contents(logs/indexhtml.log.php): failed to open stream: No such file or directory

and

2. When i try to open de h5upload logfile
QuoteLogs :: hupload

Debug-information

Messages
 
/include/init.inc.php
Notice line 195: Undefined index: log_retention

/include/logger.inc.php
Warning line 77: file_get_contents(logs/hupload.log.php): failed to open stream: No such file or directory

And still the database logfile is filling al the time whit this messages:
QuoteDec 22, 2018 at 10:55 AM - 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 cpg16x_pictures AS r
INNER JOIN cpg16x_albums AS a ON a.aid = r.aid
WHERE (1)
AND approved = 'YES'
ORDER BY ctime ASC, pid ASC
LIMIT 0 ,-3563' in include/functions.inc.php on line 1626 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-3563' at line 7
ca. 1 every hour.
QuoteDec 22, 2018 at 11:06 AM - While executing query 'SELECT cid FROM cpg16x_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 49 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND' at line 1
ca. 100 every hour.

Enybody who knows a workarround or solution?

ron4mac

The log files warnings are something that we can take care of in an update.

The database errors may indicate a problem with your database.  I will try to discover the cause.

ron4mac

I've looked into this and I am quite certain that there is no problem with your database. I believe these logged database errors are coming from external entities (bots, spiders, other sites) trying to access your gallery with improper links.
example: http://foto.destormvogels.nl/index.php?cat=30
Something trying to link to a non-existing category.

If you look in your site access logs you will likely see such accesses.

You should make sure that none are coming from your Joomla site (old, incorrect links).

We may be able to do some work to try to validate such bad links prior to trying to access the database; thus reducing these kind of entries in the log.

axial63

OKe Thanks!

I will look in to more information about the incomming traffic...

From the Joomla site it's almost impossible, there is only one (1) direct link and no deep linking to photo's.

Again,
Many thanks

and Happy Holidays!!

axial63

Indeed...

Al errors listed above that where found in the database logfile where coused by Bots and Spiders.

So i'v made an robots.txt file and after installing that the logfiles are empty. (atleast for the last hour)  ;D

Thank you for pointing the wright way.  8)