How to fix jos_session error in Joomla PDF Print E-mail
User Rating: / 6
PoorBest 

If you Joomla root site show this error :

mossession::store failed
DB function failed with error number 1034
Incorrect key file for table 'jos_session'; try to repair it SQL=INSERT INTO jos_session ( `session_id`,`time`,`username`,`gid`,`guest` ) VALUES ( '3fb0665c11671cb724b8fd4f37439d6f','1187102382','','0','1' )

The message show error in "jos_session" table and this table located at your joomla database at phpMyAdmin.

http://i270.photobucket.com/albums/jj97/zool_85/sql4.jpg

You can fix your "jos_session" table by running some Mysql code. Here is the step :

 

Open your Cpanel, at the databases sub menu, click on phpMyAdmin. On the phpMyAdmin interface, select the Joomla database that the problem occurs. Example, if the error of your main site comes from Joom1 database, select joom1.

http://i270.photobucket.com/albums/jj97/zool_85/sql5.jpg

On default display when you choose your database, it will display the "structure" tab content, then open the SQL tab like figure below:

http://i270.photobucket.com/albums/jj97/zool_85/sql1.jpg

On the Run SQL query/queries blank form, copy paste this code:

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;

 

 

Then, click GO button to execute it

http://i270.photobucket.com/albums/jj97/zool_85/sql2.jpg

Click OK if you really want to execute this command.

If the code work successfully, this figure below will show the message "Your SQL query has been executed succesfully.

http://i270.photobucket.com/albums/jj97/zool_85/sql3.jpg

Comments (23)Add Comment
...
written by Alejandra, September 20, 2008
Thanks for this. I've tried it and it worked successfully. However now I get a new error :

jtablesession::Store Failed
DB function failed with error number 1054
Unknown column 'client_id' in 'field list' SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id ` ) VALUES ( '6ad44bfb5739a442d7bd315c0c014fbb','1221873551','','0', '1','0' )
Thanks
written by Samuel, December 15, 2008
This forum save my life. Aweson response. Thanks
Will it work if it is a 1142 error?
written by Patrick, January 08, 2009
I have:

DB function failed with error number 1142

error. will this script do the same for the 1142 as with 1034?
problem
written by rajeev, February 12, 2009
i am facing problem to open the web site it shows me jose seesion i dont understand anything to fix this problem
prevent the insert into query to perform
written by myza, March 16, 2009
Hi, I have jos_session error that force our server to down.
Can I just remove the query to insert values at jos_session table for guest?
Which LOC can i found to remove the queries?
1.5.x version of the query
written by Erre, April 21, 2009
Thanks for this tip that helped me a lot to recover my site!

However, this query works only for 1.0.x because the structure of jos_session changed for 1.5.x (and this is the problem Alejandra had); in order to make the query work, it has to be like this (the new stuff is in bold character):

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',
`client_id` tinyint(3) unsigned NOT NULL default '0',
`data` longtext,
PRIMARY KEY (`session_id`),
KEY `whosonline` (`guest`,`usertype`)
)
...
written by jalu, May 25, 2009
thanks, thank you very much.
TY
written by Pelle, June 23, 2009
Thanx Erre, you made my day smilies/wink.gif
Work but Not Work
written by xozex, July 18, 2009
Thanks for this trick,
Anyway this is usefull and worked, but not for long time, the problem will come again like same case, any Idea ?

Regard
Not at all fixing
written by kacang, August 05, 2009
not for long time if the visitor come too much .. jos_session will be died again, this is my experience, any Idea ?
Finally solved!
written by Alessandro, August 12, 2009
Same problem as Alejandra!

Erre contribution works perfectly!!!
Thanks everybody
SAME problem Joomla 1.5.14 - ERROR 1142 - My database size has exceeded allowed server space :/ boo
written by Kate Fisher, September 25, 2009
Hi,

sadly I ve just been hit with this problem too! My ISP says my table has exceeded the space allowed for mysql database, presumably similar issue to "kacang"

Heck and bother. I dont know which tables I can securely start dropping data from aside from sessions.

Bother and heck and bother thrice more.

Any ideas very welcome

Kate
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
Prefer "EMPTY" rather than "DROP"
written by parasolx, October 07, 2009
I suggest not to DROP and RECREATE table. Since some third module party will add addition table to make it function. So i suggest to EMPTY the whole jos_table by clicking EMPTY tab at top in phpmyadmin.

I will solved and surely solve the problem.
...
written by PJM, December 03, 2009
Thanks A million Erre!
dude
written by fraz, December 07, 2009
dude..thanks so much
Query not work for joomla 1.58, empty table is not work too
written by ipul, December 11, 2009
Thank for all suggestion. i have the same problem. i was run the query above, but is not work for my web. i using joomla 1.58. I was follow PARASOLX suggest that must be empty the jos_table, but still not working too. my web still cannot be access. please help me.
this my web http://www.ditulis.in
...
written by Michal, December 13, 2009
Hi
I tried that code but it didnt work:

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;

#1142 - CREATE command denied to user 'doncaster4u'@'77.55.69.155' for table 'jos_session' - check your database quota
...
written by Michal, December 13, 2009
Now I am getting thet error:

DB function failed with error number 1146
Table 'doncaster4u.jos_session' doesn't exist SQL=SELECT session_id FROM jos_session WHERE session_id = 'add4ee2be3c5be5dad5708ea0615efa8'
SQL =

SELECT session_id
FROM jos_session
WHERE session_id = 'add4ee2be3c5be5dad5708ea0615efa8'

Please help.
Michal
...
written by Daniel Condurachi, December 14, 2009
It worked in a way for me. I did what was told to do for Joomla 1.5 and not I get this
404 - Component not found

You may not be able to visit this page because of:

1. an out-of-date bookmark/favourite
2. a search engine that has an out-of-date listing for this site
3. a mistyped address
4. you have no access to this page
5. The requested resource was not found.
6. An error has occurred while processing your request.

Please try one of the following pages:

* Home Page

If difficulties persist, please contact the System Administrator of this site.

Component not found

https://marketing.easic.com/marketing/
please help
written by norbert, January 04, 2010
please help me . yesterday i visited my web site and what i see smilies/cheesy.gifb functio failde with error number 1142 .

how to solve this problem . .please help me
...
written by navid, January 29, 2010
Thanks a lot.
404 Component not found
written by Vlada, February 03, 2010
I had the same problem as Alejandra, and i used the code You did for her, but now I get 404 error. How to fix?
404 Component not found
written by Hassan, February 19, 2010
Same error: I had the same problem as Alejandra, and i used the code You did for her, but now I get 404 error. How to fix?

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

busy
 
< Prev

 

Custom Search

 

Follow Us

Login Form






Lost Password?
No account yet? Register