forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: taucher_0815 on August 10, 2010, 06:22:45 pm

Title: CPG 1.5.8 - Database-Error in Logfile
Post by: taucher_0815 on August 10, 2010, 06:22:45 pm
Hi Team!

Yesterday i upgraded my CPG (http://www.sk-foto.info) to the latest version of 1.5.8

Now checking the logs I found an error in the DB-Log.
Quote
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 cpg15x_pictures AS r
INNER JOIN cpg15x_albums AS a ON a.aid = r.aid
WHERE (r.aid = 173) AND r.aid NOT IN (61, 6, 113, 144, 145, 156)
AND approved = 'YES'
AND hits > 0
ORDER BY hits ASC, pid DESC
LIMIT 0 ,-1121' in include/functions.inc.php on line 1593 the following error was encountered:
Fehler in der SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen bei '-1121' in Zeile 8

Any Ideas?

Best regards
Sven
Title: Re: CPG 1.5.8 - Database-Error in Logfile
Post by: Αndré on September 03, 2010, 01:34:14 pm
Does it happen continuously or is it just a single entry?
Title: Re: CPG 1.5.8 - Database-Error in Logfile
Post by: taucher_0815 on September 03, 2010, 02:17:34 pm
appeared a few times and then disappeared...
Marking it as resolved.
Title: Re: CPG 1.5.8 - Database-Error in Logfile
Post by: helmutmk on October 24, 2010, 11:46:47 am
Hello,
I found the also information more than one time like this:

Code: [Select]
# 24. Oktober 2010 um 06:19 - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 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 'AND' at line 1
# Oct 24, 2010 at 09:34 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 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 'AND' at line 1
# 24. Oktober 2010 um 09:48 - While executing query 'INSERT INTO cpg145_exif (pid, exifData) VALUES (3838, 'a:10:{s:13:\"VerboseOutput\";i:0;s:6:\"Errors\";i:0;s:9:\"ValidJpeg\";i:1;s:13:\"ValidIPTCData\";i:0;s:13:\"ValidJFIFData\";i:1;s:13:\"ValidEXIFData\";i:0;s:13:\"ValidAPP2Data\";i:0;s:12:\"ValidCOMData\";i:1;s:4:\"JFIF\";a:4:{s:4:\"Size\";i:16;s:4:\"Data\";s:14:\"JFIF\0\0\0\0\0\0\";s:10:\"Identifier\";s:5:\"JFIF\0\";s:13:\"ExtensionCode\";s:2:\"01\";}s:3:\"COM\";a:2:{s:4:\"Size\";i:59;s:4:\"Data\";s:57:\"CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 85
\";}}')' in include/exif_php.inc.php on line 57 the following error was encountered:
Duplicate entry '3838' for key 1
# Oct 24, 2010 at 09:54 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 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 'AND' at line 1
Title: Re: CPG 1.5.8 - Database-Error in Logfile
Post by: Αndré on November 03, 2010, 12:20:29 pm
Hello,
I found the also information more than one time like this:

Code: [Select]
# 24. Oktober 2010 um 06:19 - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 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 'AND' at line 1
# Oct 24, 2010 at 09:34 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 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 'AND' at line 1
# 24. Oktober 2010 um 09:48 - While executing query 'INSERT INTO cpg145_exif (pid, exifData) VALUES (3838, 'a:10:{s:13:\"VerboseOutput\";i:0;s:6:\"Errors\";i:0;s:9:\"ValidJpeg\";i:1;s:13:\"ValidIPTCData\";i:0;s:13:\"ValidJFIFData\";i:1;s:13:\"ValidEXIFData\";i:0;s:13:\"ValidAPP2Data\";i:0;s:12:\"ValidCOMData\";i:1;s:4:\"JFIF\";a:4:{s:4:\"Size\";i:16;s:4:\"Data\";s:14:\"JFIF\0\0\0\0\0\0\";s:10:\"Identifier\";s:5:\"JFIF\0\";s:13:\"ExtensionCode\";s:2:\"01\";}s:3:\"COM\";a:2:{s:4:\"Size\";i:59;s:4:\"Data\";s:57:\"CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 85
\";}}')' in include/exif_php.inc.php on line 57 the following error was encountered:
Duplicate entry '3838' for key 1
# Oct 24, 2010 at 09:54 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 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 'AND' at line 1

Line 47 reads
Code: (include/functions.inc.php) [Select]
$result = cpg_db_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']} WHERE lft BETWEEN $lft AND $rgt");
The variables $lft and $rgt are not populated in your case, but they should, as they are fetched some lines above:
Code: [Select]
        $result = cpg_db_query("SELECT rgt, lft, depth FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = $cat LIMIT 1");
        list($rgt, $lft, $CURRENT_CAT_DEPTH) = mysql_fetch_row($result);

Please check your categories table if all rows have entries for that fields.
Title: Re: CPG 1.5.8 - Database-Error in Logfile
Post by: Αndré on November 23, 2010, 10:43:58 am
Here (http://forum.coppermine-gallery.net/index.php/topic,68252.msg338331.html#msg338331) is some new information regarding to taucher_0815's issue.