Tuesday, February 23, 2010

How to fix jos_session problem in Joomla


ON the Run SQL query/queries on database Copy and paste this code and click Go


DROP TABLE IF EXISTS `jos_session`;
CREATE TABLE IF NOT EXISTS `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`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


So this sql query will drop the existing jos_session which is using an engine MEMORY
and create a new one with an engine MyISAM. Engine Memory may either good for fast retreival
of data but really consumes much memory in DB. So instead of using engine MEMORY for jos_session
table, we changed it to MyIsam. Well it works great for me. ;)

3 comments:

Unknown said...

I'd love to use it but scared incase it breaks anything then i'm stuck with a broken site. Would be nice if you could tell us a way to reverse it if it goes bad :(

alreymark said...

Hey D0gSoldi3r, to reverse the query back to MEMORY Engine, you will just have to change "ENGINE=MyISAM" back to "ENGINE=MEMORY" and run the script again.

cheers!

Anonymous said...

Hey D0gSoldi3r, to reverse the query back to MEMORY Engine, you will just have to change "ENGINE=MyISAM" back to "ENGINE=MEMORY" and run the script again.

cheers!