MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: Magento shopping cart errors  (Read 3876 times)

0 Members and 1 Guest are viewing this topic.

Offline Administrator

  • Chinmay Dingore
  • Administrator
  • Full Member
  • *****
  • Posts: 135
  • Karma: +1/-0
    • View Profile
    • MilesWeb Internet Services Pvt Ltd
Magento shopping cart errors
« on: March 26, 2014, 07:35:40 PM »
Hi Members,

Recently, I have had this strange issue where one of the table under the database was missing. Here is the error which kept flashing on the website.

Quote
SQLSTATE[42S02]: Base table or view not found: 1146 Table '.log_visitor' doesn't exist

I was fortunate that the backups were configured & I restored the database table. But, what if you do not have the backup ? Below is the SQL query you should execute to fix it.

Access phpMyAdmin and select the database. Click on the SQL tab and enter the query below under Run SQL query/queries on database

Quote
CREATE TABLE IF NOT EXISTS `log_visitor` (
  `visitor_id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Visitor ID',
  `visitor_type` varchar(1) NOT NULL COMMENT 'Visitor Type',
  `remote_addr` bigint(20) NOT NULL COMMENT 'Remote Address',
  `first_visit_at` timestamp NULL default NULL COMMENT 'First Visit Time',
  `last_visit_at` timestamp NULL default NULL COMMENT 'Last Visit Time',
  `customer_id` int(10) unsigned default NULL COMMENT 'Customer ID',
  `last_url` varchar(255) default NULL COMMENT 'Last URL',
  PRIMARY KEY  (`visitor_id`),
  KEY `IDX_LOG_VISITOR_ONLINE_VISITOR_TYPE` (`visitor_type`),
  KEY `IDX_LOG_VISITOR_ONLINE_FIRST_VISIT_AT_LAST_VISIT_AT` (`first_visit_at`,`last_visit_at`),
  KEY `IDX_LOG_VISITOR_ONLINE_CUSTOMER_ID` (`customer_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Log Visitor Online Table'

Click on Go and you table gets created. You should be able to access the website now.

Now that's the reason we say backup plans are important. They come handy if you land in such a mess.

Quote
Looking for quality Magento hosting? Look no further than MilesWeb Magento Hosting.
« Last Edit: December 08, 2016, 08:35:16 PM by Turkey »
MilesWeb.com - Your Hosting, Our Responsibility!
Unlimited Hosting Plans | Managed VPS with 20% Discount

MilesWeb Hosting Forum

Magento shopping cart errors
« on: March 26, 2014, 07:35:40 PM »