Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 11:42 am EST
Geeklog Forums
Error 1064 (haven't seen one quite like this)
Status: offline
PasteEater
Forum User
Junior
Registered: 09/11/03
Posts: 15
Hi all! I finally got Geeklog installed today, and the installation seems to have gone well. However, when I pull up the site on localhost, I get the following error:
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
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 [/code]
I've been looking through the forums, and although many people have had this error, I have yet to see one exactly like this one. I did find one instance that was somewhat similar, and the remedy was to replace the lib-common.php file with a fresh one. I tried that, but it didn\'t work.
Does anyone have any advice as to how to fix this? BTW, where are the error logs generated to? I have the dummy file, but nothing has been entered into it (sorry, I\'m a noob, can you tell).
Thanks!
9
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
We need the complete error message from Geeklog\'s error.log file.
That file is in /path/to/geeklog/logs/error.log. If there\'s nothing in it (other than the \"dummy entry\"), then it isn\'t writable. Go through the section of the installation instructions again that talks about chmoding files and use the check.php script to test your installation.
bye, Dirk
15
15
Quote
Status: offline
PasteEater
Forum User
Junior
Registered: 09/11/03
Posts: 15
Hi Dirk, thanks for the reply! Here\'s my error.log entry:
Fri Sep 12 13:17:44 2003 - 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 sure wish I knew what all of this meant. Hopefully you can make some sense of this.
Thanks again for you patience and help!!
Josh
14
15
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
That's exactly the same problem as reported in this thread.
The solution there was to upload a fresh copy of lib-common.php. But you said you already tried that ...
When you open your lib-common.php and search for "LEFT JOIN" you should find this:
(({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid)
It should say
Text Formatted Code
LEFT JOIN {$_TABLES['stories']} ON(({$_TABLES['stories']}.sid = {$_TABLES['comments']}.sid)
$_TABLES['stories']
twice - and it seems the second one is missing in your case. Can you confirm that?
bye, Dirk
9
12
Quote
Status: offline
PasteEater
Forum User
Junior
Registered: 09/11/03
Posts: 15
My exact entry reads like this:
LEFT JOIN {$_TABLES[\'stories\']} ON (({$_TABLES[\'stories\']}.sid = {$_TABLES[\'comments\']}.sid)\" . (etc.)
That line, however, is split up over a couple lines, and there may be an extra space in there somewhere (specifically after the \"s\" and the apostrophie on the second \"stories\". Would that make a difference? Is there more than one instance of this in the file?
Thanks again!
11
18
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by PasteEater: My exact entry reads like this:
That looks perfectly okay. And this is from the exact same copy of lib-common.php that\'s running on your site (and is causing the error there)?
If so, I\'m stumped ...
There\'s only one occurence of this (pretty complex) SQL request in Geeklog (it\'s for the What\'s New block, btw).
bye, Dirk
19
16
Quote
Status: offline
PasteEater
Forum User
Junior
Registered: 09/11/03
Posts: 15
Yep, that\'s the copy that is running the site. Nothing has been changed in this copy of lib-common.php except for the line pointing to my config.php file.
Any other ideas?
Thanks again!
15
11
Quote
Status: offline
PasteEater
Forum User
Junior
Registered: 09/11/03
Posts: 15
Ok, I\'ve tried installing Geeklog on two different computers now, and have gotten the same error. After the initial install, the path to //127.0.0.1/admin/install/success.php comes up fine, but when I \"\'Click Here\' to see your new Geeklog site!\" (http://127.0.0.1) I get the 1064 error. I\'ve double (triple, quadruple) checked my paths and permissions (with check.php). Very strange.
I did not mention that I am running this under Mac OS X. I don\'t think that it makes a difference though. I have also been referencing this page [MacOSXHints.com] for instructions on how to install Geeklog.
I\'m pulling my hair out here!!!
If anyone has any advice (and much thanks to Dirk for helping so far) I would _really_ appreciate it.
thanks
11
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The only thing I can offer is to either deactivate the What\'s New block entirely or set
$_CONF[\'hidenewcomments\'] = 1;
in config.php. That way, the offending SQL request would not be executed (but you would lose the What\'s New block or at least the list of new comments).
As for the cause of the problem, I\'m out of ideas for the moment
bye, Dirk
10
14
Quote
Status: offline
PasteEater
Forum User
Junior
Registered: 09/11/03
Posts: 15
It worked! I\'m not sure why I have to disable new comments (maybe because there are no comments yet?) but the site works, and that\'s what\'s important.
Dirk, you rock!
Thanks again.
9
13
Quote
Status: offline
izzaboo
Forum User
Newbie
Registered: 09/29/03
Posts: 9
Quote by PasteEater: My exact entry reads like this:
LEFT JOIN {$_TABLES[\'stories\']} ON (({$_TABLES[\'stories\']}.sid = {$_TABLES[\'comments\']}.sid)\" . (etc.)
That line, however, is split up over a couple lines, and there may be an extra space in there somewhere (specifically after the \"s\" and the apostrophie on the second \"stories\". Would that make a difference? Is there more than one instance of this in the file?
Thanks again!
Hi. I had this *exact* problem. I also had the line split as you described. I fixed it in pico (I had editted the file in BBEdit Lite) and now the error has disappeared. I just got rid of the extra line breaks, etc. But now I can\'t seem to login as admin...
Brick by brick, my citizens. Brick by brick.
-i
14
19
Quote
cliche
Anonymous
Another with the same problem on mac os x. Fix worked too, although I wonder if I can turn new comments back on after I have some?
16
15
Quote
Neil D
Anonymous
I was in the same situation using Mac OS X.3
re :
http://www.geeklog.net/forum/viewtopic.php?forum=1&showtopic=29990
and setting hidenewcomments =1; has resolved this issue for me as well, albeit by disabling the new comments notification.
Thanks nonetheless!
Neil
re :
http://www.geeklog.net/forum/viewtopic.php?forum=1&showtopic=29990
and setting hidenewcomments =1; has resolved this issue for me as well, albeit by disabling the new comments notification.
Thanks nonetheless!
Neil
21
15
Quote
42n8
Anonymous
If you unarchive the tarball on a windoze box and use ftp to get it to the server make sure you upload the files in ASCII NOT binary
This will solve many obscure problems. This is because when windows uploads a binary file it converts the data to binary format rather than sending each individual byte. *nix doesn't know about this and stores the binary file faithfully as ASCII leaving the file basically corrupt.
Most, if not all, FTP clients have a selectable option to upload in ASCII.
I suggest that this info be included in any install info upgrade
This will solve many obscure problems. This is because when windows uploads a binary file it converts the data to binary format rather than sending each individual byte. *nix doesn't know about this and stores the binary file faithfully as ASCII leaving the file basically corrupt.
Most, if not all, FTP clients have a selectable option to upload in ASCII.
I suggest that this info be included in any install info upgrade
27
34
Quote
brossow
Anonymous
The problem here is that (at least in my case) the text editor (in my case, pico) was forcing a new line after 255 characters on the line. Reassembling it all into one line by moving the cursor to the beginning of the 'split' line and deleting backwards to get it up onto the previous line with the rest of the text solved the problem. I had to do this twice as the line was split twice (into three lines.)
Be aware that future edits to the file may well cause this line to split again.
Brent
Be aware that future edits to the file may well cause this line to split again.
Brent
15
14
Quote
All times are EST. The time is now 11:42 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