Support

UNiTE, Remote CLI, eXtract Wizard

#3468 After migration DB error message

Posted in ‘UNiTE and Remote CLI’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
Tool
UNiTE
Tool version
n/a

Latest post by nicholas on Friday, 30 September 2011 09:50 CDT

user2049
Dear friends:

Finally could restore the backup. But cant start the website getting the following database error:

jtablesession::store failed
DB function failed with error number 1054
Unknown column 'session_id' in 'field list' SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'e6ba5f988dfc5cab7e11d3fca8bf07b4','1233180736','','0','1','1' )

Please help!

Thank you very much.

Jonathan

dlb
Jonathan,

It looks like an error in the creation of the session table. The good news is that I'm pretty sure we can drop that table and recreate it. It sticks in my mind that there was a Joomla! bug involving that table a while back. I need Nicholas to look at this to make sure I'm right.

Dael


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user2049
Dear Dale!

Thank you very much. It must be an error in joomla due to the fact that all the other tables have been restored perfectly. I am pretty und pressure with this site and beleive me I am going cracy. I would highly appreciate if Nicolas could take a look on that. Go to www.uncli.org and you will see the error message. A donation will be guerranteed by my friends who run the web!

Thanks a lot.

Yours Jonathan

dlb
If you're in a jam, you can drop the table and recreate it, but I would really like to wait for Nicholas on this.

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;

Dale


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user2049
Dear Dale:

As this is very important I agree to wait for Nicolas. I am not experienced in SQL and so far your support is higly appreciatet. Anyhow I am very happy with JoomlaPack which means a milestone in Joomla for me.

Thank you so much.

Sincerely Yours
Jonathan

nicholas
Akeeba Staff
Manager
Jonathan,

I agree with Dale's solution. The jos_session table only holds temporary session data, so dropping it and recreating it is not going to give any problem whatsoever. However, if you are on a MySQL 4 host the aforementioned SQL statement should be modified into:
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`) );


Tha lack of the ENGINE and DEFAULT CHARSET ensures MySQL 4 compatibility.

After you are able to log into your site, please check all of its functions to ensure that nothing is missing and everything's working properly. If there have been other MySQL restoration errors we'll perform an emergency manual restoration and get your site running in no time at all. In fact, we have even documented this process to make sure that people in a hurry are not left out in the cold if something doesn't work.

Just like in aviation, we have thought of an automatic, a semi-automatic and a manual procedure for every mission critical step of the backup/migration workflow :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user2049
Dear Nicolas:

First of all thank you very much for your help. I am trying to do as you recommanded. I let you know about the results!

Thank you.

Jonathan

user2049
Hallo Dale and Nicolas:

I am back to the board. Had an accident and was hospitalized. Since today at home and back to my DB problem! So now I did what you recommended and IT WORKED! You are great people and I realy apreciate your support! Let me know where to send a donation!

Yours Jonathan!

dlb
Jonathan,

A hospital is a terrible place to spend time, especially when you're not feeling well. I was in for a week in December. They seemed to have a goal of waking me up every half hour between 2 am and 7 am. They very rarely missed. :x At least mine was by choice (transplant). Take care of yourself.

I'm glad you got the site working.

Dale


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user47500
Hi champs,

I need a help here. I have searched and came across one of your forums that it may be similar to my issue about "unknown column" and "jos_session"

I have site on Joomla CMS for long while until I got email from hosting provider saying they have upgraded to PHP 5.3 and MySQL 5.1 on new Linux/cPanel servers and said that the older version of Joomla my be affected which need upgrade version. So I did tried to upgrade (after backups done on site and DB) via Softaculous but made a mistake as was using Joomla 1.7 instead of Joomla 1.5 which didn't work. So I got the back up done on site and database.

Before I could even upgrade to 1.5.23, I got this message on both site (index.php) and CMS (/administrator/index.php) as follows -

Unknown column 'client_id' in 'field list' SQL=INSERT INTO `jos_session` (`session_id`, `client_id`, `time`) VALUES ('fa0b834af10b6c9a8743e82e447e4f49', 0, 1317292656)



So havig searched the internet and came across to this forum page discussion and said to fix this is to drop the table and recreate it.

So I got the code from your page as follows:

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`) );


Are they right one for me to use? Not sure how to do this but to save lot of typing - please see the screen-shot image (see link) to see if I am placing in the right place on my "phpMyAdmin" site?

Screen shot image -
http://www.lyndonborrow.com/download/screen_shot_myphpadmin_01.PNG

Let me know if that is right before I can take the next step? Just in case if you need to know my server information etc - see on further below.


Many thanks.

Lyndon



=====================================================

MySQL
Server: Localhost via UNIX socket
Server version: 5.1.56
Protocol version: 10
User: dibf@localhost
MySQL charset: UTF-8 Unicode (utf8)

Web server
cpsrvd 11.30.4.6
MySQL client version: 5.1.56
PHP extension: mysql

phpMyAdmin
Version information: 3.4.5, latest stable version: 3.4.5

nicholas
Akeeba Staff
Manager
Hi Lyndon,

Your problem is due to the wrong update to Joomla! 1.7. What happened is that Joomla! 1.7 files got left behind -restoring a backup does not remove files; it's a feature- but due to their naming and the way Joomla! works, they take precedence and Joomla! 1.5.23 tries to load them... and hell breaks loose.

The proper course of action is this:
- Keep a copy of your backup archives locally. I suggest keeping 2-3 copies of each (you can never be too paranoid!)
- Do a test restoration on a local server, just to make sure that your backups do work; what we're about to do is dangerous and you must have tested backups or you risk losing it all.
- Remove ALL JOOMLA! FILES from your account.
- Restore the latest backup archive

This will work (I have tried it on my local testing servers).

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user47500
Hi Nicholas,

Thanks for your reply.

Yeah, apparently before I star trying to upgrade (to wrong one Joomla 1.7) I did backup of whole server and also back up the database.

When I realised I have used wrong Joomla (1.7 instead of 1.5), I removed all web files and replaced with from back-up files. I also removed the database to replace with the back-up ones. So then when I try to run a web page it has an error message as I have mentioned in my previous post.

So U take it that you saying it still wont work if I try to use 'create table' - codes from your earlier post -

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`) );


...right? Hmm?

Lyndon

nicholas
Akeeba Staff
Manager
I am confused by your description. Akeeba Backup produces whole site backups, which include all files, the database and an installer. If you remove all files from your account and restore a full site backup there should be no problem.

Based on your description, it sounds like you restored the database and your files manually. This could mean that your configuration.php file isn't updated which could explain this problem.

If you DID use a full site backup made by Akeeba Backup, you DID restore it in full (using the integrated restoration script to restore your database) and you still have this problem, please check your database. Do all of your other tables start with jos_ or do they have another prefix? Do you see the jos_session table after trying to manually create it?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!