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: broken query for "last comments" in cat=0  (Read 12007 times)

0 Members and 1 Guest are viewing this topic.

ysidoro

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
    • http://www.pilas.net
broken query for "last comments" in cat=0
« on: September 11, 2004, 03:55:12 am »

When I ask for "New Comments" from first page, I receive the following error:

There was an error while processing a database query.

While executing query "SELECT COUNT(*) from cpg11d_comments, cpg11d_pictures  WHERE approved = 'YES' AND cpg11d_comments.pid = cpg11d_pictures.pid AND ( )" on 0

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 ')' at line 1

If I ask for "New Comments" from any other page (or album) the error is not present.

Please, confirm me if I need to post in another place, I do not found a dev-beta forum
« Last Edit: December 08, 2004, 10:45:55 am by Tarique Sani »
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
« Reply #1 on: September 11, 2004, 05:27:06 am »

Can anyone else confirm this?
Logged
SANIsoft PHP applications for E Biz

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
« Reply #2 on: September 11, 2004, 06:15:53 am »

Are you sure you have the right database?  Your table name starts with cpg11d - cpg 1.4 would start with cpg140
Logged
GO IRISH

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
« Reply #3 on: September 11, 2004, 06:29:02 am »

Ahhh!! I get a hint from mstralka's query - have you run the latest update.php?
Logged
SANIsoft PHP applications for E Biz

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
« Reply #4 on: September 11, 2004, 02:04:07 pm »

Are you sure you have the right database? Your table name starts with cpg11d - cpg 1.4 would start with cpg140

This is not quite correct.  It would be if it was a new install, but if an upgrade will be the original prefix of the version first installed.

There is no support for the dev version yet, as it is for developers and experienced users only, and this is why the 1.4 board is not visible to normal users yet..  Locking this thread.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
broken query for "last comments" in cat=0
« Reply #5 on: October 14, 2004, 08:39:04 am »

Maybe it's just me (I'm still a bit ashamed of my previous report that turned out to be a hoax), but I think there's something broken in the devel branch: when clicking on "last comments" in the root category (or with no particular category selected at all), I get
Quote
There was an error while processing a database query.
While executing query "SELECT COUNT(*) from cpg_test_comments, cpg_test_pictures  WHERE approved = 'YES' AND cpg_test_comments.pid = cpg_test_pictures.pid AND ( )" on 0

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 ')' at line 1

 File: /opt/root/home/wein-aus-argentiniende/public_html/coppermine/include/functions.inc.php - Line: 160
with debug mode turned on. I guess the var $ALBUM_SET get's filled incorrectly, but I'm not sure why this happens (haven't looked into it too deeply) - maybe this bug has been there for some time, I haven't checked in a while. Could someone look into this please (or prove I'm an a** for reporting yet another hoax bug)?

Thanks

Joachim

P.S. You can see this error "live" on my test gallery at the usual url (won't post it here again, so I don't have to edit this posting once this threads gets public)
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: broken query for "last comments" in cat=0
« Reply #6 on: October 14, 2004, 08:48:26 am »

Confirmed - to make it go away temperorily for visitors - just have atleast one album as admin only ....
Logged
SANIsoft PHP applications for E Biz

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: broken query for "last comments" in cat=0
« Reply #7 on: November 16, 2004, 11:39:57 am »

This should now be fixed in functions.inc.php v 1.134
Logged
SANIsoft PHP applications for E Biz

cryogenic

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 79
    • the cynic says...
Re: broken query for "last comments" in cat=0
« Reply #8 on: November 20, 2004, 06:40:32 am »

My functions.inc.php is 1.133 and I still have the same error... when I try to view last comments from the main page when logged in as admin, I get the same error. However, not logged-in users can view last comments just fine. Seems that anyone who has access to ALL of the albums gets this error unless they have an album or category selected.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: broken query for "last comments" in cat=0
« Reply #9 on: November 20, 2004, 08:37:16 am »

If Tarique says that this is being fixed in version 1.134, you will have to get this version (or a newer one) from the cvs, here's no point in reporting bugs in an older version than that has the fix. Take a look at the instructions how to use cvs. If you don't want to use a cvs client, you can check out the most recent versions (one by one though) using the web cvs access.

Joachim
Logged

cryogenic

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 79
    • the cynic says...
Re: broken query for "last comments" in cat=0
« Reply #10 on: November 21, 2004, 04:30:13 am »

My bad... I was comparing my version to the version listed in my versioncheck.php which did not list the newest version. I didn't see it in CVS when I initially made my post but since then it has appeared and I have upgraded to the 1.134 version.. It appears to be working fine at this point. Thanks. :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: broken query for "last comments" in cat=0
« Reply #11 on: November 21, 2004, 06:41:43 am »

I manually update versioncheck.php data every now and then - versioncheck.php is meant for the stable release files mainly, it's not the tool of choice for the devel version. Usage of CVS is recommended, preferably the cvs client software (but web cvs should work as well).

Joachim
Logged

cryogenic

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 79
    • the cynic says...
Re: broken query for "last comments" in cat=0
« Reply #12 on: November 21, 2004, 11:34:10 am »

Yeah, I've noticed that versioncheck.php occasionally lags behind a version or two. I'd say it's a pain to keep it completely up to date with what's in CVS especially when you have 2-3-4 changes in a 24 hour period. I've normally just been using webCVS as I've not had any luck getting any cvs clients to work on my PC. Now that that one bug has been fixed, I'm quite happy with the stability of cpg.. hopefully we'll see a full release soon. :)
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: broken query for "last comments" in cat=0
« Reply #13 on: November 21, 2004, 11:59:06 am »

OT, but in reply to cryogenic,

the instructions in the sourceforge page for using the cvs can be misleading(and nothing we can do about it).  Nibbler has posted a very good instruction, with screenshots, of how to get Tortoise cvs working with our cvs.  A search should find it.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: broken query for "last comments" in cat=0
« Reply #14 on: November 21, 2004, 06:05:09 pm »

Tortoise CVS makes it easy to update your files with those in the CVS. Just a right-click and select. And that ease makes it easier to keep up with the multiple changes per day.
Logged

cryogenic

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 79
    • the cynic says...
Re: broken query for "last comments" in cat=0
« Reply #15 on: November 26, 2004, 08:55:00 am »

OT, but in reply to cryogenic,

the instructions in the sourceforge page for using the cvs can be misleading(and nothing we can do about it). Nibbler has posted a very good instruction, with screenshots, of how to get Tortoise cvs working with our cvs. A search should find it.

I cannot, for the life of me, find the post to which you are referring. I searched for tortoise, cvs, tutorial, and every combination thereof and could not find anything even close to being useful. As such, I'll continue my file-by-fille method as tedious as it may be. It's still easier than trying to figure out how to make tortoise work. :)
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

cryogenic

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 79
    • the cynic says...
Re: broken query for "last comments" in cat=0
« Reply #17 on: November 27, 2004, 12:46:51 pm »

had it setup correctly... forgot to change from "checkout" to "export". *forehead smack*
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 19 queries.