Welcome to Geeklog, Anonymous Sunday, December 01 2024 @ 04:06 pm EST
Geeklog Forums
Site is down with sql error
Page navigation
in html source - minor) Then when I logged out it gave me the sql error message (above). I tried clearing my browser cache and cookies but this did not work. I get the same error with another identical error in the log file. I looked in the log file and found this: Sun 19 Aug 2007 03:56:18 PM EDT - 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 () I have seen this error message mentioned in other threads on this forum but I never saw a solution or at least one that I could understand. I'm not sure how to get it up and running again. Your help/advice would be much appreciated. Thanks, Dave, Frustrated Soccer Coach
Dave from Cincy
suprsidr
My best friend in these situations is phpMyAdmin.
This way I have access to my remote database in order to disable the offending plugin.
Try disabling each plugin one-by-one(likely starting with the one you were editing) until you are able to login again.
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
dnowery
I wasn't editing a plugin, at least I didn't think I was. I used some plugins... the spamx which came installed. The editor that I used to edit the static page I suppose was a plugin.
My take on the error message is that my group information somehow got corrupted. I did manage to find the SQL statement causing the problem inside the group.php file.
Your suggestion is to install this utility that allows me to tweak the data inside the MySQL tables, is that correct? I noticed that I would need to have PHP 5 running for this utility to work.
Thanks,
Dave
machinari
If you do, I suggest that you use it and then begin your edits again--slowly.
machinari
...Your suggestion is to install this utility that allows me to tweak the data inside the MySQL tables, is that correct? I noticed that I would need to have PHP 5 running for this utility to work.
Thanks,
Dave
suprsidr
yes that is my suggestion. Plugins are easy to disable that way, and may be the culprit(not familiar with your precise error).
not true at all. I'm not.and I'm using: phpMyAdmin - 2.10.3
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
dnowery
Dave from Cincy
machinari
... It shows 0 of 25 available databases being used..
machinari
See http://help.godaddy.com/article.php?article_id=33&topic_id=67 for more info
dnowery
Perhaps you should ask godaddy about how the databases are accessed. Once you have access, disable your plugins via the plugins table, most commonly called gl_plugins. Unless your files are corrupt then I wouldn't go editing group.php or any other file (lib-security.php) where that query may be made from.
Dave from Cincy
dnowery
According to godaddy, "...you can create new databases, delete databases, or make changes to existing databases." See http://help.godaddy.com/article.php?article_id=33&topic_id=67 for more info
Dave from Cincy
Dave from Cincy
mevans
Since you don't have any tools available to see what is actually in the DB, here is a quick script you can save as dbDump.php in your web root, run it and it will show what is in both the group_assignment table and the groups table. Once we know this, we can see if the insert you referenced will help or not.
You will need to edit the server, dbname, user and password to match those entries from your Geeklog config.php file:
<?php
$hostname = 'localhost';
$user = 'dbuserhere';
$pass = 'dbpasswdhere';
$dbname = 'dbnamehere';
// connect to the database
$db = mysql_connect($hostname,$user,$pass) or die('Cannot connect to DB server');
// Set the database
@mysql_select_db($dbname) or die('error selecting database');
$sql = "SELECT * FROM gl_group_assignments";
$result = @mysql_query($sql,$db);
$numrows = mysql_numrows($result);
echo 'gl_group_assignment table';
echo '<table border="1">';
echo '<tr><th>ug_main_grp_id</th><th>ug_uid</th><th>ug_grp_id</th></tr>';
while ( $row = mysql_fetch_array($result, MYSQL_ASSOC ) ) {
echo '<tr><td>' . $row['ug_main_grp_id'] . '</td>' .
'<td>' . $row['ug_uid'] . '</td>' .
'<td>' . $row['ug_grp_id'] . '</td>' .
'</tr>';
}
echo '</table>';
$sql = "SELECT * FROM gl_groups";
$result = @mysql_query($sql,$db);
$numrows = mysql_numrows($result);
echo 'gl_groups table';
echo '<table border="1">';
echo '<tr><th>grp_id</th><th>grp_name</th><th>grp_descr</th><th>grp_gl_core</th></tr>';
while ( $row = mysql_fetch_array($result, MYSQL_ASSOC ) ) {
echo '<tr><td>' . $row['grp_id'] . '</td>' .
'<td>' . $row['grp_name'] . '</td>' .
'<td>' . $row['grp_descr'] . '</td>' .
'<td>' . $row['grp_gl_core'] . '</td>' .
'</tr>';
}
echo '</table>';
?>
You'll probably need to save it locally and then FTP to your server. Then run in the browser: http://www.webst.us/geeklog/public_html/dbDump.php
Hopefully this will help a little.
Thanks!
Mark
machinari
dnowery
Dave from Cincy
mevans
The output tells me that you are indeed missing the anonymous user group assignment. Cut / Paste this script to you site (call it fixdb.php), give it a run and see if it helps:
<?php
$hostname = 'localhost';
$user = 'dbuserhere';
$pass = 'dbpasswdhere';
$dbname = 'dbnamehere';
// connect to the database
$db = mysql_connect($hostname,$user,$pass) or die('Cannot connect to DB server');
// Set the database
@mysql_select_db($dbname) or die('error selecting database');
$sql = "insert into gl_group_assignments (ug_main_grp_id, ug_uid) values (2,1);"
$result = @mysql_query($sql,$db);
echo 'Group assignment database updated - try site again...';
?>
Give this a shot and hopefully that will get you going again.
Thanks!
Mark
Dave from Cincy
jmucchiello
Am I out of luck?
Page navigation
- 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