Database query error Database query error
 

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

Database query error

Started by Bazzah, January 19, 2007, 04:45:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bazzah

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?

Nibbler

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

Bazzah

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

Bazzah

 ;D Thanks. Works perfectly now!

Nibbler

If you updated your gallery from 1.3 to 1.4 then there may be other old files, use versioncheck.php.