Empowering you with the knowledge to master Linux web hosting, DevOps and Cloud

 Linux Web Hosting, DevOps, and Cloud Solutions

Joomla jos_session table crashed

You may come across the following error sometime if you are working joomla site.
jtablesession::Store Failed
DB function failed with error number 145
Table ‘./eilmccco_cmsicdc/jos_session’ is marked as crashed and should be repaired SQL=INSERT INTO jos_session ( `session_id`,`time`,`username`,`gid`,`guest`,`clie nt_id` ) VALUES ( ‘ca7331cb8a008d79e24df425257229ea’,’1227636484′,” ,’0′,’1′,’0′ )

This is a very common error. The problem with this error is that you cannot access your site nor the admin page.
The error messages means that the table “jos_session” is crashed or damaged. This table stores your session information.

This issue can be easily fixed by repairing the session table. For doing this the first thing you should do is find out your joomla database. This can be done by checking your joomla configuration.php file.
Now we can try  repairing the table in following ways.

Cpanel
If you are using the Cpanel, then you can repair you joomla database by clicking the “Repair DB” option in the Mysql section of the Cpanel.

phpMyAdmin

If you can access your database though phpMyAdmin, then on the phpMyAdmin interface, select the joomla database and look for the table “jos_session”. Once you selected the “jos_session” (tick the checkbox) and choose “Repair table” from the drop-down you find at the bottom of the list of tables.

SSH access

If you have shell access of your server, the database can be repaired within the Mysql.
Login to the mysql with necessary privileges
#mysql -u <dbuser> -p
mysql> use joomla1;                              [Assume your joomla database name is joomla1]
mysql> REPAIR TABLE jos_session;

If all the above tricks failed, then you must recreate the “jos_session” table

First of all, please take a complete backup of the joomla database.

phpMyAdmin

1 – Go to MySQL phpMyadmin Control Panel

2 – Go and click on “SQL” near the top left corner of the page, and paste the following lines (below) into the empty text area :

DROP TABLE IF EXISTS `jos_session`;
CREATE TABLE `jos_session` (
`username` varchar(150) 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’,
`client_id` tinyint(3) unsigned NOT NULL default ‘0’,
`data` longtext,
PRIMARY KEY (`session_id`(64)),
KEY `whosonline` (`guest`,`usertype`),
KEY `userid` (`userid`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

3 – Click on “Execute” or “Go” to execute the command.

Thats it. This must fix your concern…

Please let me know your feedback and also if you have any other easy workaround

Previous

It all started here..

Next

Flex2gateway 404 error with railo

1 Comment

  1. shanil

    Nice post ….. waiting for new tips…… 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Theme by Anders Norén