Select Page

How to Solve a Problem with Joomla! jos_session

How to Solve a Problem with Joomla! jos_session


Require an access to the Plesk/CPA panel.

Go to your #Joomla database, select the table jos_session (tick the checkbox) and choose “Repair table” from the drop-down you find at the bottom of the list of tables.

Using PHP

Maybe the most easiest for non techies people

I found this useful script, upload it at root of your host (in /httpdocs) under repair.php for example and run it, you’ll see the following:

Tick repair, provide your login and password for database,

Remove the scripts after use, or add a die(‘not for use, edit script first’); at the top of it just in case it may be use to inject something in your database!

Shell access

For the most advanced of us, which understand Unix and have shell access

# mysql –udblogin -p

mysql>  use joom;

mysql> REPAIR TABLE jos_session;
| Table | Op | Msg_type | Msg_text |
| joom.jos_session | repair | warning | Number of rows changed from 0 to 2 |
| joom.jos_session | repair | status | OK |

Finding #Joomla! login and password

These informations can be found in httpdocs/configuration.php under $user and $password as seen below


var $user = ‘hkuin47Gdfver’;
var $db = ‘joom’;
var $dbprefix = ‘dfrtCsdef_’;
var $mailer = ‘mail’;
var $fromname = ‘Happpp’;
var $sendmail = ‘/usr/sbin/sendmail’;
var $smtpauth = ‘0’;
var $smtpsecure = ‘none’;
var $smtpport = ’25’;
var $smtpuser = ”;
var $smtppass = ”;
var $smtphost = ‘localhost’;
var $MetaAuthor = ‘1’;
var $MetaTitle = ‘1’;
var $lifetime = ’15’;
var $session_handler = ‘database’;
var $password = afedfhrr546fdhcfcv;


And if the repair failed?

Run the following sql to drop the table and make it new. Copy it into the PhpMyAdmin SQL field.

DROP table if exist `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`)

About The Author

Cédric Walter

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.