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: Database query error  (Read 2529 times)

0 Members and 1 Guest are viewing this topic.

Bazzah

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Database query error
« on: January 19, 2007, 04:45:13 pm »

I recently noticed that when listing images in a SUB category by last uploaded or last commented, you were unable to click the thumbnail to view the intermediate image, as you would get the following error:

Fatal error: Call to undefined function: db_query() in /home/hiresco1/public_html/gallery/displayimage.php on line 259

I don't know anything about php, so I messed around to try and get it working. After removing line 257:

$res = db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$CURRENT_PIC_DATA['pid']}' AND author_id = ".USER_ID);

it worked perfectly. Obviously I am a bit concerned about removing code, as I do not know what else it will affect. Can anyone help me?
« Last Edit: January 20, 2007, 02:17:43 am by Nibbler »
Logged

Nibbler

  • Guest
Re: Database query error
« Reply #1 on: January 19, 2007, 04:56:49 pm »

That is 1.3 code. Why is it in your 1.4 gallery? Replace displayimage.php with a clean copy from the download package.
Logged

Bazzah

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Database query error
« Reply #2 on: January 19, 2007, 07:57:18 pm »

Thanks for the reply. I have no idea why it is in there. I will replace it. Thanks
Logged

Bazzah

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Database query error
« Reply #3 on: January 19, 2007, 08:00:04 pm »

 ;D Thanks. Works perfectly now!
Logged

Nibbler

  • Guest
Re: Database query error
« Reply #4 on: January 20, 2007, 02:17:16 am »

If you updated your gallery from 1.3 to 1.4 then there may be other old files, use versioncheck.php.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 21 queries.