How to fix jos_session error

Joomla version 1.5 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
heliox
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jan 11, 2009 5:05 pm

How to fix jos_session error

Post by heliox » Fri Jan 16, 2009 5:54 pm

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

robspcs
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Sep 17, 2007 6:52 pm

Re: How to fix jos_session error

Post by robspcs » Fri Jan 16, 2009 6:30 pm

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`
#

heliox
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jan 11, 2009 5:05 pm

Re: How to fix jos_session error

Post by heliox » Sat Jan 17, 2009 8:57 am

Thanks so much.

hanyumaw
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Tue Oct 26, 2010 2:04 am

How to fix jos_session error

Post by hanyumaw » Fri Feb 18, 2011 6:31 am

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

webmystery
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Tue Aug 05, 2008 10:59 pm

Re: How to fix jos_session error

Post by webmystery » Fri Mar 04, 2011 6:31 am

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.

devkbsc
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Sat Jul 03, 2010 2:03 pm

Re: How to fix jos_session error

Post by devkbsc » Sat Sep 10, 2011 11:42 pm

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.

zarvan
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Mon Aug 29, 2011 12:55 pm

Re: How to fix jos_session error

Post by zarvan » Sun Sep 11, 2011 3:57 am

waoooooo
its very good devkbsc
my problem was that you said and i solve it with your solution

prohosterz
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 22, 2012 5:58 am
Location: World Wide Web
Contact:

Re: How to fix jos_session error

Post by prohosterz » Thu Mar 22, 2012 6:01 am

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' )

User avatar
rajeshatbuzz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 198
Joined: Wed Sep 24, 2008 6:06 pm
Location: Bangalore
Contact:

Re: How to fix jos_session error

Post by rajeshatbuzz » Wed Jan 09, 2013 1:30 pm

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')
cmsGalaxy Team, Web Developer, Bangalore, India
Website Design - Development - SEO - Joomla
www.cmsGalaxy.com

Rezayusefi
I've been banned!
Posts: 24
Joined: Tue Jan 15, 2013 7:05 am

Re: How to fix jos_session error

Post by Rezayusefi » Mon Mar 18, 2013 3:40 pm

hi devkbsc
thank you very much
thats very good solution for me and i use it

tr1
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 239
Joined: Sun Apr 30, 2006 11:35 am
Location: UK

Re: How to fix jos_session error

Post by tr1 » Tue Jul 09, 2013 2:52 pm

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

User avatar
senukexvn
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Wed Sep 26, 2012 4:26 am
Contact:

Re: How to fix jos_session error

Post by senukexvn » Wed Aug 14, 2013 5:40 pm

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

kraftygreg
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri May 24, 2013 5:23 am

Re: How to fix jos_session error

Post by kraftygreg » Sat May 03, 2014 5:32 am

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

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: How to fix jos_session error

Post by dpacadmin » Sat May 03, 2014 4:50 pm

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.

User avatar
ladydevil
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Sun Sep 14, 2014 5:56 am
Location: Singapore
Contact:

Re: How to fix jos_session error

Post by ladydevil » Mon Sep 15, 2014 5:40 pm

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

latindigitalboy
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jun 29, 2016 2:08 pm

Re: How to fix jos_session error

Post by latindigitalboy » Wed Jun 29, 2016 2:10 pm

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! :'(

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: How to fix jos_session error

Post by dpacadmin » Wed Jun 29, 2016 8:30 pm

@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?

sundar50000
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Jul 25, 2016 4:41 am

Re: How to fix jos_session error

Post by sundar50000 » Mon Jul 25, 2016 5:20 am

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

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30809
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: How to fix jos_session error

Post by Per Yngve Berg » Mon Jul 25, 2016 6:40 am

There is no table named jos_template_styles in Joomla 1.5. Post in the proper forum.


Locked

Return to “Installation 1.5”