Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 08:56 pm EDT

Geeklog Forums

Link Editor Problem, post ugrade


Status: offline

andyofne

Forum User
Chatty
Registered: 08/31/02
Posts: 69
Last week I upgraded my geeklog site from 1.35 to the latest release. Prior to the upgrade my link editor section worked fine.

Following the upgrade I get this note when I try to add a new link (I notice the link editor works fine on this site).

I've looked at the links in the database table, not sure what the heck i'm looking for but I have to tell you this is sort of frustrating. Here is the 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 '' at line 1

I did several searches here looking for the 1064 error but didn't find anything with regard to the Link Editor section.

What should I be looking for? What would have been changed between the 1.35 release and the newest one?

Thanks,

andyofne

 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Like the message says, there's something wrong with a SQL statement being fed to MySQL. Check your Geeklog error log and see if it provided more specifics on the problem. The 1064 error is often caused because: the code didn't trap a scenario where bad input is generated, a file got corrupted and inserted or removed characters, table names changed, field names changed, data changed, bad data is in the database, etc. In other words it covers a broad range of possibilities.

I have no idea what the difference is between 1.35 and 1.3.7sr1, but if you're on a Windows system Blaine has a really neat utility to do file comparisons. You can download it here . If Geeklog's error log or this file comparison utility doesn't give you a clue as to what the problem is, then I recommend you insert some debugging right into the code to find out what data is being fed to the SQL statement causing it to spit out this error. You can do this by either using echo statements to send it to the screen or the function COM_errorLog to send it to the error log.
 Quote

Status: offline

andyofne

Forum User
Chatty
Registered: 08/31/02
Posts: 69
Thanks for the reply. I'm not a database guru so I doubt I'll be able to do what you're suggesting. Also I don't run the webserver, its at a paid hosting site with limited access to the server itself (which is UNIX based, not Window$Wink.

I wasn't even aware of the error log... anyway, here is the complete error.

Sat Apr 19 20:06:05 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 '' at line 1 SQL in question: SELECT username FROM gl_users WHERE uid =

That WHERE uid = (nothing) is what it shows in the error log.

As I said, this is something that popped up post ugrade.

 Quote

Anonymous

Anonymous
rerun the script that checks file and directory permissions, I had this same error and resetting these fixed it.
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Blaine's file comparison utility is a windows program which you can easily run on your PC...if your PC is running windows. It takes two files and visually highlights the differences. I looked around in the submit, link, and admin link files. I only see the SQL statement you posted in one place for link submissions. It seems pretty weird if that's the location. The script is supposed to insert the user's id from the global array $_USER in the where expression "uid =" . This value is obtained by reading a person's cookies. If he has none, the uid is supposed to be one for anonymous. Try deleting your cookies and see if that works.
 Quote

Status: offline

andyofne

Forum User
Chatty
Registered: 08/31/02
Posts: 69
Wthout fixing anything suddenly it's working. I see a lot of this 1064 error message in various parts of Geeklog, this seems somewhat pervasive. Not knowing php or mysql very well I can't offer any help but it seems hinky. Thanks for the replies just the same.
 Quote

AndyM

Anonymous
I am seeing this exact same problem, only my GL site is a fresh install, and I have successfully added links previously. The message in error.log is identical to the above (except for timestamp, of course). As suggested previously, I deleted cookies from my browser but this had no effect. I've also tried disabling all plugins -- same. I'm open to ideas...
 Quote

AndyM

Anonymous
Unfortunately, unlike the previous problem reported, mine has not suddenly started working. Frown I'd really like to resolve this problem. Can ANYONE suggest how to do so? Thanks in advance!
 Quote

Anonymous

Anonymous
I'm having the same problem with a new install. Did you ever get it working?
 Quote

All times are EDT. The time is now 08:56 pm.

  • 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