Posted on: 04/04/04 11:19pm
By: NuckingFuts
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!
SQL error after installation
Posted on: 04/05/04 02:28pm
By: Dirk
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
SQL error after installation
Posted on: 04/05/04 02:30pm
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
SQL error after installation
Posted on: 04/05/04 03:42pm
By: Anonymous (NuckingFuts)
[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).[/quote]
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.
SQL error after installation
Posted on: 04/05/04 03:46pm
By: NuckingFuts
[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[/QUOTE]
1.3.9, downloaded just last night.
SQL error after installation
Posted on: 04/05/04 03:51pm
By: Dirk
The option in config.php would be
$_CONF['hidenewcomments'] = 1;
Previous discussions are
here[*1] ,
here[*2] , and
here[*3] - 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
SQL error after installation
Posted on: 04/05/04 04:27pm
By: NuckingFuts
Well, I disabled the new comments and it seems to be working perfectly. Odd that this is happening.
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!
SQL error after installation
Posted on: 05/29/04 11:09pm
By: Anonymous (Jason Bruder)
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
SQL error after installation
Posted on: 09/12/05 08:40am
By: Anonymous (Olaf Alferink)
Thanks for the tip! That was a real quick fix!