Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 07:04 am EDT

Geeklog Forums

SQL error after installation


Status: offline

NuckingFuts

Forum User
Newbie
Registered: 04/04/04
Posts: 5
confused
Hi all. I'm running GeekLog on a Mac OS X 10.3 box, with PHP 4.3.4 and MySQL 4.0.18 Standard. While installing, everything seems to be working. However, before the "success" page will come up, I receive and error: "An SQL error has occured. Please see error.log for details."

Looking in the error log shows me this:
Sun Apr 4 21:56:08 2004 - 1064: 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 '= gl_comments.sid) AND (gl_stories.perm_anon >= 2) AND (gl_stor. SQL in question: SELECT DISTINCT count(*) AS dups, type, question, gl_stories.title, gl_stories.sid, qid, max(gl_comments.date) as lastdate FROM gl_comments LEFT JOIN gl_stories ON ((.sid = gl_comments.sid) AND (gl_stories.perm_anon >= 2) AND (gl_stories.draft_flag = 0) AND (tid IN ('General','GeekLog'))) LEFT JOIN gl_pollquestions ON ((qid = gl_comments.sid) A
ND (gl_pollquestions.perm_anon >= 2)) WHERE (gl_comments.date >= (DATE_SUB(NOW(), INTERVAL 172800 SECOND))) AND ((((gl_stories.perm_anon IS NOT NULL))) OR (((gl_pollquestions.perm_anon IS NOT NULL)))) GROUP BY gl_comments.sid ORDER BY 7 DESC LIMIT 15

I've read through some of the other replies, and have tried a few of the steps. I've dropped the database and re-ran the script, only to have it fail again. I've set the permissions of a few directories, the ones named in the install instructions, to 777. At this point, I'm lost. I've checked the database and it is writing the tables, and there is data in the tables, so I know it can at least talk to the database.

Any ideas? Thanks!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Well, that looks like the same sort of error that has been reported before. As a quick fix, you can disable the display of new comments (as has been mentioned in one of the earliere discussions).

Is this on MacOS X Server or the consumer version? Last I heard, the problems were fixed on Server with the 10.3.3 update ...

bye, Dirk
 Quote

Status: offline

Tony

Site Admin
Admin
Registered: 12/17/01
Posts: 405
Location:Urbandale, Iowa
Well this snippet isn't good:

"...ON ((.sid = gl_comments.sid)...". Looks like table name before .sid isn't there. I'd have to take a closer look to try and explain why. What version of GL you using?

--Tony
The reason people blame things on previous generations is that there's only one other choice.
 Quote

NuckingFuts

Anonymous
Quote by Dirk: As a quick fix, you can disable the display of new comments (as has been mentioned in one of the earliere discussions).


I'm having some issues finding an article describing how to do this. Could you please post a link or the steps?

Is this on MacOS X Server or the consumer version? Last I heard, the problems were fixed on Server with the 10.3.3 update ...


This is just plain old OS X 10.3.3 client.
 Quote

Status: offline

NuckingFuts

Forum User
Newbie
Registered: 04/04/04
Posts: 5
Quote by Tony: Well this snippet isn't good:

"...ON ((.sid = gl_comments.sid)...". Looks like table name before .sid isn't there. I'd have to take a closer look to try and explain why. What version of GL you using?

--Tony


1.3.9, downloaded just last night.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The option in config.php would be

$_CONF['hidenewcomments'] = 1;

Previous discussions are here, here, and here - see if those give you any insights.

For the record, I'm on MacOS X (since 10.0, currently at 10.3.3) and never had that problem. I've used the MySQL packages provided by Marc Liyanage and later those directly from mysql.com, but usually build my own version of PHP.

bye, Dirk
 Quote

Status: offline

NuckingFuts

Forum User
Newbie
Registered: 04/04/04
Posts: 5
Well, I disabled the new comments and it seems to be working perfectly. Odd that this is happening. Confused

For installation, I used the MySQL package from mysql.com and the PHP package from Entropy.ch. Never had any issues with those packages before, but who knows. In any case, thanks for the help!
 Quote

Jason Bruder

Anonymous
I'm running Mac OS X 10.3.4 server with the entropy PHP release and had the same error. Doing the fix suggested solves the problem. Thanks for such a great product.


Jason Bruder
 Quote

Olaf Alferink

Anonymous
Thanks for the tip! That was a real quick fix!
 Quote

All times are EDT. The time is now 07:04 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content