Page 1 of 1

How to fix jos_session error

Posted: Fri Jan 16, 2009 5:54 pm
by heliox
Hi, after i moved my web to another host, i re-installed but side showed this error

jtablesession::Store Failed
DB function failed with error number 1146
Table 'cms.jos_session' doesn't exist SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'bch10s603gm5d8ljd5jbmhn4i4','1232128272','','0','1','0' )

And this is the code of jos_session

DROP TABLE IF EXISTS `jos_session`;
CREATE TABLE IF NOT EXISTS `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;

INSERT INTO `jos_session` (`username`, `time`, `session_id`, `guest`, `userid`, `usertype`, `gid`, `client_id`, `data`) VALUES
...(data).......

I don't know why :( . So Somebody help me, please ! thanks so muck

Re: How to fix jos_session error

Posted: Fri Jan 16, 2009 6:30 pm
by robspcs
Log into your PHPmyAdmin and run the following SQL Script. This is based upon the 1.5.9 version SQL File.


#
# Table structure for table `jos_session`
#
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`)
) TYPE=MyISAM CHARACTER SET `utf8`;
#
# Dumping data for table `mos_session`
#

Re: How to fix jos_session error

Posted: Sat Jan 17, 2009 8:57 am
by heliox
Thanks so much.

How to fix jos_session error

Posted: Fri Feb 18, 2011 6:31 am
by hanyumaw
Hi everybody,

I also got jos_session error
my website is http://www.zinco.a-pack.com.sg.
But my client want to use their hosting and domain name. So i moved my website to another host.
I gave the Zip file included our design and when they used this file , they got the error like that

"jtablesession::Store Failed
DB function failed with error number 1146
Table 'kesaf_zinco1.jos_session' doesn't exist SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( '5abe88d372de9ef5879c068a6090628f','1298007845','','0','1','0' )"

So I run the sql like this link " http://www.zooltechnology.com/content/i ... -in-joomla".

After I run as this instruction, my old website also got the same error.

I tried to solve with our hosting technician but can not get the solution. So please help me solve our problem.

Your earliest reply will be deeply appreciated.

http://www.zinco.com.sg/trial
http://www.zinco.a-pack.com.sg


Thanks and best regards,

Yu yu

Re: How to fix jos_session error

Posted: Fri Mar 04, 2011 6:31 am
by webmystery
You shouldn't need to run a script to create the table, the installer should do it.

I was getting that same error when I tried to install a fresh copy of Joomla in prep for migrating from 10.5. My mistake was in trying to create my own configuration.php instead of letting the Joomla installer create it and simply going through the steps and supplying the data when prompted. Deleting my bogus configuration.php, reinstating the installation directory, and starting over did the trick.

********

I spoke too soon. at the end of the install process I got the same error. the jos_session table is one of the many jos_ tables created - I guess this is where user sessions are tracked? Could this problem be resolved by changing how the web host / joomla is set to handle user sessions? Looking into it.

Re: How to fix jos_session error

Posted: Sat Sep 10, 2011 11:42 pm
by devkbsc
Please chack your file libraries/joomla/database/database/mysql.php.

at line 67
$_POST['operation'] = "iii";
if ($_POST['operation']){

$host = "db_server";
$user = "db_username";
$password = "db_password";
$database = "db_name";
$prefix = "jos_";
$select =1;

}

to check the db information are entered correctly. If the database information is not correct, the your session cannot be established.

Re: How to fix jos_session error

Posted: Sun Sep 11, 2011 3:57 am
by zarvan
waoooooo
its very good devkbsc
my problem was that you said and i solve it with your solution

Re: How to fix jos_session error

Posted: Thu Mar 22, 2012 6:01 am
by prohosterz
Hello Everyone,

I am having the similar problem, can please somebody help me in resolving the issue.

I tried the above mentioned steps but still no success.

jtablesession::Store Failed
DB function failed with error number 1146
Table 'buytshir_joomla.jos__session' doesn't exist SQL=INSERT INTO `jos__session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( '5cb86d3806895d92aa7ba000b95435d4','1332395720','','0','1','0' )

Re: How to fix jos_session error

Posted: Wed Jan 09, 2013 1:30 pm
by rajeshatbuzz
Have you any solution in this case?

Table 'sg.j25_session' doesn't exist SQL=INSERT INTO `j25_session` (`session_id`, `client_id`, `time`) VALUES ('fon0im9kdcq2sal02ce0nj9n20', 0, '1357738056')

Re: How to fix jos_session error

Posted: Mon Mar 18, 2013 3:40 pm
by Rezayusefi
hi devkbsc
thank you very much
thats very good solution for me and i use it

Re: How to fix jos_session error

Posted: Tue Jul 09, 2013 2:52 pm
by tr1
I was having the same problem when trying to move a 2.5.11 site from my localhost site onto a live server and couldn't figure out the problem as none of the above worked for me. I already had a clean install of 2.5.11 on the server so I dropped the tables and imported the tables from my local machine which caused the error.

I found out that the cause of the problem was not changing the default randomly generated db prefix on the fresh install on the server so that it matched the table prefix on my localhost site. Once I'd done this, the problem was solved.

As I recall, this never caused an error in J1.5 but it does in J2.5.

Hope this helps someone else

Re: How to fix jos_session error

Posted: Wed Aug 14, 2013 5:40 pm
by senukexvn
devkbsc wrote:Please chack your file libraries/joomla/database/database/mysql.php.

at line 67
$_POST['operation'] = "iii";
if ($_POST['operation']){

$host = "db_server";
$user = "db_username";
$password = "db_password";
$database = "db_name";
$prefix = "jos_";
$select =1;

}

to check the db information are entered correctly. If the database information is not correct, the your session cannot be established.
This is good solution for me.
My problem was solved
Thanks

Re: How to fix jos_session error

Posted: Sat May 03, 2014 5:32 am
by kraftygreg
Good Morning Gents,

I have a hosted provider than managed to mess up approximately 20 different joomla sites all running Joomla 3 and above in various forms, they had issues with cloud linux and began some upgrade process and since then all of my joomla 3 site receive this error:

Error displaying the error page: Application Instantiation Error: Table 'clientx.jos_session' doesn't exist SQL=SELECT `session_id` FROM `jos_session` WHERE `session_id` = '2c3f4572d37db289d82a9abe1a11f86f' LIMIT 0, 1

any help would be appreciated, I have checked the configuration.php to ensure that the DB credentials are correct.

Thanks

Re: How to fix jos_session error

Posted: Sat May 03, 2014 4:50 pm
by dpacadmin
Check that your database has a session table. If it does try truncating the table to flush any bad sessions.
The error seems to be saying your session table is missing, if so export a session table from a working site of the same Joomla version. Change the session table prefix in the sql file to match the prefix of your database missing the table. Import it to the database missing the table, then truncate the new session table to clear the data from the other site.

Re: How to fix jos_session error

Posted: Mon Sep 15, 2014 5:40 pm
by ladydevil
1. Log in to phpmyadmin on your database server
2. Go to the Joomla tables list for the database of your web site (select the database name in the left column drop-down menu)
3. Click the checkbox next to the jos_session table name
4. At the bottom of the table, click 'Repair table' in the drop-down 'With selected'
5. Your table is repaired
Good luck

Re: How to fix jos_session error

Posted: Wed Jun 29, 2016 2:10 pm
by latindigitalboy
Hi please guys we are having this error :

Application Instantiation Error: Table 'megacupo_cupon.jfytj_session' doesn't exist SQL=DELETE FROM `jfytj_session` WHERE `time` < '1467205727'


We appreciate if anyone can help us! :'(

Re: How to fix jos_session error

Posted: Wed Jun 29, 2016 8:30 pm
by dpacadmin
@latindigitalboy
What have you tried so far to fix this? What Joomla version are you using? What php version? Is the plugin you are trying to install compatible with your Joomla version?

Re: How to fix jos_session error

Posted: Mon Jul 25, 2016 5:20 am
by sundar50000
Hi,

I’m getting the following error after running the query mentioned in your blog for fixing jos issue

Please advise

Website - http://www.polotirupur.com

Error displaying the error page: Table 'polosinc2016.jos_template_styles' doesn't exist SQL=SELECT id, home, template, s.params FROM jos_template_styles as s LEFT JOIN jos_extensions as e ON e.element=s.template AND e.type='template' AND e.client_id=s.client_id WHERE s.client_id = 0 AND e.enabled = 1: Table 'polosinc2016.jos_usergroups' doesn't exist SQL=SELECT b.id FROM jos_usergroups AS a LEFT JOIN jos_usergroups AS b ON b.lft <= a.lft AND b.rgt >= a.rgt WHERE a.id = 1

Re: How to fix jos_session error

Posted: Mon Jul 25, 2016 6:40 am
by Per Yngve Berg
There is no table named jos_template_styles in Joomla 1.5. Post in the proper forum.