Joomla Sessions Table Corrupt

Pin It

Site was Unreachable last Night

This morning as I checked the site didn’t come up, just ashort message about the session failed..

DB function failed with error number 1016
Can’t open file: ‘jos_session.MYI’ (errno: 145) SQL=SELECT session_id FROM jos_session WHERE session_id

Now I know enough of PhpMyAdmin to repair it but I found a thread on a Mambo forum that with a litte change solved the problem fast.. once I figured it out.

Its about dropping the session table and creating it again.

So here the code if you encounter something like this:

#
# Table structure for table `jos_session`
#
DROP table IF EXISTS jos_session;
CREATE TABLE `jos_session` (
`username` varchar(50) default ”,
`time` varchar(14) default ”,
`session_id` varchar(200) NOT NULL default ’0′,
`guest` tinyint(4) default ’1′,
`userid` int(11) default ’0′,
`usertype` varchar(50) default ”,
`gid` tinyint(3) unsigned NOT NULL default ’0′,
PRIMARY KEY (`session_id`),
KEY `whosonline` (`guest`,`usertype`)
) TYPE=MyISAM;
#
# Dumping data for table `mos_session`
#

Hope this was a one time problem…

Related Posts Plugin for WordPress, Blogger...

Speak Your Mind

*