Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 11:49 am EST
Geeklog Forums
Table "in use"
Michael Bathrick
Anonymous
I have the gl_sessions table "in use" according to phpMyAdmin - nothing is working. Any idea what happened and how to fix it?
5
6
Quote
guest
Anonymous
Any ideas out there? What should be in this table?
7
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by guest: Any ideas out there?
Not sure what could have caused it, but have you tried repairing the table?
Quote by guest: What should be in this table?
Well, session data, obviously. It's safe to empty the table (or even delete and recreate it) if nothing else helps.
bye, Dirk
6
7
Quote
duvide
Anonymous
I have the same problem and when I drop the table "sessions" and recreate it in myphpadmin (copy/paste the code for creating the session table from the obove mentioned file) I get the error:
MySQL said: Documentation
#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 '{$_TABLES['sessions']} (
sess_id int(10) unsigned NOT NULL d
I have almost 4000 users on my site, I need to solve this problem quickly, the site is competely down.
Needless to say that I cannot make any sense from error message.
Thanks/Frank
MySQL said: Documentation
#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 '{$_TABLES['sessions']} (
sess_id int(10) unsigned NOT NULL d
I have almost 4000 users on my site, I need to solve this problem quickly, the site is competely down.
Needless to say that I cannot make any sense from error message.
Thanks/Frank
7
5
Quote
Status: offline
knuff
Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Hi Frank,
From what I understand you just copy / paste the SQL statement in phpmyadmin from the php file, hence your {$_TABLES['sessions']}.
$_TABLES is a variable that is dynamically changed when you use the install script in the GL environment, but phpmyadmin has no clue what this is, so you would have to alter that part of the statement so it uses the correct table prefix.
If you didnt change the default, changing {$_TABLES['sessions']} into gl_sessions should work.
I dont have the table script at hand, so if you still have an error, just copy the full SQL syntax here.
Unless someone else can copy paste it for you here.
Best Regards,
Boris
Vanrillaer.com - our Family Portal
From what I understand you just copy / paste the SQL statement in phpmyadmin from the php file, hence your {$_TABLES['sessions']}.
$_TABLES is a variable that is dynamically changed when you use the install script in the GL environment, but phpmyadmin has no clue what this is, so you would have to alter that part of the statement so it uses the correct table prefix.
If you didnt change the default, changing {$_TABLES['sessions']} into gl_sessions should work.
I dont have the table script at hand, so if you still have an error, just copy the full SQL syntax here.
Unless someone else can copy paste it for you here.
Best Regards,
Boris
Vanrillaer.com - our Family Portal
7
9
Quote
Status: offline
knuff
Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
This is the one for GL 1.3.11
CREATE TABLE `gl_sessions` (
`sess_id` int(10) unsigned NOT NULL default '0',
`start_time` int(10) unsigned NOT NULL default '0',
`remote_ip` varchar(15) NOT NULL default '',
`uid` mediumint(8) NOT NULL default '1',
`md5_sess_id` varchar(128) default NULL,
PRIMARY KEY (`sess_id`),
KEY `sess_id` (`sess_id`),
KEY `start_time` (`start_time`),
KEY `remote_ip` (`remote_ip`)
) TYPE=MyISAM;
Vanrillaer.com - our Family Portal
Text Formatted Code
CREATE TABLE `gl_sessions` (
`sess_id` int(10) unsigned NOT NULL default '0',
`start_time` int(10) unsigned NOT NULL default '0',
`remote_ip` varchar(15) NOT NULL default '',
`uid` mediumint(8) NOT NULL default '1',
`md5_sess_id` varchar(128) default NULL,
PRIMARY KEY (`sess_id`),
KEY `sess_id` (`sess_id`),
KEY `start_time` (`start_time`),
KEY `remote_ip` (`remote_ip`)
) TYPE=MyISAM;
Vanrillaer.com - our Family Portal
6
8
Quote
duvide
Anonymous
Puh! Thanks Boris, you saved my day!
it is working again!
I cannot say how much I appreciate your help!
Frank
it is working again!
I cannot say how much I appreciate your help!
Frank
7
6
Quote
Bob
Anonymous
I am getting a similar problem but with the users table I am getting this error;
Can't open file: gl_users.MYD
When I looked with phpMyAdmin it says that the table is in use!
Any idea why this is happening and what the .MYD file is ?
Thanks.
Bob
Can't open file: gl_users.MYD
When I looked with phpMyAdmin it says that the table is in use!
Any idea why this is happening and what the .MYD file is ?
Thanks.
Bob
6
6
Quote
Status: offline
knuff
Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
In most cases this is caused by a corruption of the table.
If this happens on the gl_sessions table, the quick fix is to drop and recreate it, since it only contains session data and can easily be dropped.
In your case it is gl_users and you do NOT want to drop that one.
Try a repair on the table.
Run following SQL query using phpMyAdmin
REPAIR TABLE gl_users
This will often fix the table.
If it doesn't, well the fastest solution is restoring your backup if you do have a very recent backup. But there are other workarounds too.
Boris
Some additional alternatives:
MySQL - Crash Recovery
Vanrillaer.com - our Family Portal
If this happens on the gl_sessions table, the quick fix is to drop and recreate it, since it only contains session data and can easily be dropped.
In your case it is gl_users and you do NOT want to drop that one.
Try a repair on the table.
Run following SQL query using phpMyAdmin
REPAIR TABLE gl_users
This will often fix the table.
If it doesn't, well the fastest solution is restoring your backup if you do have a very recent backup. But there are other workarounds too.
Boris
Some additional alternatives:
MySQL - Crash Recovery
Vanrillaer.com - our Family Portal
9
5
Quote
All times are EST. The time is now 11:49 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