Advanced search  

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

Pages: [1]   Go Down

Author Topic: CPG 1.5.8 - Database-Error in Logfile  (Read 4593 times)

0 Members and 1 Guest are viewing this topic.

taucher_0815

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 134
CPG 1.5.8 - Database-Error in Logfile
« 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: CPG 1.5.8 - Database-Error in Logfile
« Reply #1 on: September 03, 2010, 01:34:14 pm »

Does it happen continuously or is it just a single entry?
Logged

taucher_0815

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 134
Re: CPG 1.5.8 - Database-Error in Logfile
« Reply #2 on: September 03, 2010, 02:17:34 pm »

appeared a few times and then disappeared...
Marking it as resolved.
Logged

helmutmk

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: CPG 1.5.8 - Database-Error in Logfile
« Reply #3 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: CPG 1.5.8 - Database-Error in Logfile
« Reply #4 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: CPG 1.5.8 - Database-Error in Logfile
« Reply #5 on: November 23, 2010, 10:43:58 am »

Here is some new information regarding to taucher_0815's issue.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.