Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 05:23 am EDT

Geeklog Forums

Sql error, see error.log for details


Status: offline

HerreVermeer

Forum User
Newbie
Registered: 03/08/06
Posts: 6
Location:Netherlands
angry
About three days ago I got this error for the first time on my website: An SQL error has occurred. Please see error.log for details. I checked the error.log file and this is what it said: 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 DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()

Okay, so it took me about two days to fix this problem. I searched all over the forum for people, who possible had the same problem. I tried all solutions, but nothing worked for me, even restoring parts of my SQL database with backups. I started replacing all geeklog files by newer ones, so I could write over a possible corrupsy on my server in one of my files.
It didn't started working again until I fully restored one of my old mysql databases. But when I tried to install the bad behavior plugin again, it immediately gave the same error again. After much hassel I managed to put together all of my old database, and after replacing the bad_behavior plugin files with newer ones, and completely ereasing it out of my database, that also seemed to work again.

It took me two days to fix this, and I could say it was rewarding, if it didn't break down again after six hours. I replaced all plugin files, disabled all plugins, restored my mysql database with the backup I made just after repairing it, about everything. I even made a backup of my full file storage, but even after restoring that I can't get it back up. Is this error possibly related to the bad_behavior plugin? Or what could I possibly do to fix this problem, and make sure my website doesn't break down ever six hours?

Thank you!
Herre Vermeer
http://fotograaf.freestarthost.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I don't think it has anything to do with the Bad Behavior plugin. This seems to happen to some people on occasion, but I haven't figured out why or under which circumstances exactly.

The problem, as indicated by the SQL error message, is that the current user is not a member of any groups any more. But user need to be in at least the All Users and Logged-in Users groups.

Did you change any group memberships when that happened?

bye, Dirk
 Quote

Status: offline

HerreVermeer

Forum User
Newbie
Registered: 03/08/06
Posts: 6
Location:Netherlands
You just said it, and I just found it out when my website went offline again. Some days ago I wanted to add a block, that has to replace the shoutbox for users who are offline, saying that there is a new block but they have to log in in order to see it. It began to annoy me that the 'alternate shoutbox' block was still visible when I was logged, so I tried to do some changes, and removing the anonymous from all users or something was one of them.

My website began to gave errors again when I logged off, so that's when I figured that the groups isseu must have had something to do with it. I restored the 'group' folders from my database to some of three months old, and everything is back to normal again, with bad behavior running.

Now in some far way bad behavior does affect the problem, as it tends to log users out when they close the window. I'm an international student, and I use my geeklog to keep in contact with my famely and friends back at home. I check my geeklog very frequently, in fact, it is my homepage in internet explorer. When I had bad behavior disabled, I never went offline in geeklog, because I opened up a new window and that way kept myself logged on. Everytime I enabled bad behavior, it went wrong again, because I was no longer logged in.

Now I could actually be thankful for bad behavior, because it kind of made the problem visible to me, it would have taken me some more time, since I rarely access my website from an other computer than my own.
Herre Vermeer
http://fotograaf.freestarthost.com
 Quote

FTI

Anonymous
I had a similar problem, I clicked 'Story' to add an item,and a Sql error occured - in the error.log it says "Thu 12 Oct 2006 12:10:44 BST - 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 count(*) FROM gl_stories WHERE 1 AND "

This problem occured on a completely fresh install; no changes whatsoever made at all to the scripts. I got in touch with my host and they did another install from their end and everything went ok again. Weird..

Also, I just did another fresh install (1.4.0sr5-1) for another domain and when I ran the admin/install/check.php I got a permission error:
`Testing data directory /home/sites/nfet.co.uk/public_html/resource/_files/data/ ...
Could not write to /home/sites/nfet.co.uk/public_html/resource/_files/data/.
Please make sure this directory exists and is set to chmod 775.
Current permissions for data: 0

When I look on the server the data folder in question isn't in the _files folder, it's in the main GL folder I did the install to. When I checked another GL I have the data folder is also in the GL folder not the _files folder. All of these installs were done via my hosts control panel not manually by me. So my question is, where should the /data folder be?

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by FTI: I had a similar problem, I clicked 'Story' to add an item,and a Sql error occured - in the error.log it says "Thu 12 Oct 2006 12:10:44 BST - 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 count(*) FROM gl_stories WHERE 1 AND "

For the record: This is not a "similar" problem to the one posted above - it's something else entirely. Something to do with the list on the story admin page - maybe a theme issue or a mixup of files from different versions.


Quote by FTI: When I look on the server the data folder in question isn't in the _files folder, it's in the main GL folder I did the install to. When I checked another GL I have the data folder is also in the GL folder not the _files folder. All of these installs were done via my hosts control panel not manually by me. So my question is, where should the /data folder be?

The data directory should be in the same directory as config.php, and the systems, backups, etc. directories. It should not be in the same directory as lib-common.php - although some of the auto installers out there seem to install Geeklog that way.

bye, Dirk
 Quote

All times are EDT. The time is now 05:23 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