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 4260 times)

0 Members and 1 Guest are viewing this topic.

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Database Query error
« on: April 07, 2011, 11:38:31 pm »

Hey Folks,

I suspect this is a server-side error, not a coppermine error, but wanted to verify it. I'm getting this error on SOME files:

Code: [Select]
While executing query 'SELECT cid FROM CPG_categories WHERE lft BETWEEN  AND ' in include/functions.inc.php on line 54

mySQL error: 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

From this gallery the first thumbnail on the page gives this error:

see here

However .. if I search by filename, I can access the file:

http://www.skolaiimages.com/stock/thumbnails.php?search=09_SEP3684.jpg&submit=search&album=search&title=on&newer_than=&caption=on&older_than=&keywords=on&filename=on&type=AND

That search gives me the thumbnail, and I can click on it and open the image just fine:

http://www.skolaiimages.com/stock/displayimage-search-0-5883-2-Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html

I've contacted my webhost, but want to make sure this isn't a function of some of the recent changes I've had made to the coppermine files first.

Thank you.

Cheers

Carl
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Database Query error
« Reply #1 on: April 08, 2011, 08:53:04 am »

Please disable the sef_url plugin, as I assume the starting digit of the title confuses the plugin. If I manually remove it from the url, it works as expected:
Quote from: error
http://www.skolaiimages.com/stock/displayimage-93-5883-2-Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html
Quote from: works
http://www.skolaiimages.com/stock/displayimage-93-5883--Grizzly-bear-cubs-Ursus-arctos-Katmai-Na.html
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Database Query error
« Reply #2 on: April 08, 2011, 08:28:15 pm »

Hey André

Ahh, that's it, thank you. I just removed the character "2" from the title and now it works fine. I'll just make sure I don't have any titles start with a number and hopefully have no more problems with it.

Thank you.

Cheers

Carl
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.