0

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'finfid.log_visitor_info' doesn't exist, query was: DESCRIBE log_visitor_info

Trace:

#0 C:\wamp\www\local\magento\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\wamp\www\local\magento\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 C:\wamp\www\local\magento\lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 C:\wamp\www\local\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('DESCRIBE `log_v...', Array)
#4 C:\wamp\www\local\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('DESCRIBE `log_v...', Array)
#5 C:\wamp\www\local\magento\lib\Zend\Db\Adapter\Pdo\Mysql.php(171): Varien_Db_Adapter_Pdo_Mysql->query('DESCRIBE `log_v...')
#6 C:\wamp\www\local\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(1596): Zend_Db_Adapter_Pdo_Mysql->describeTable('log_visitor_inf...', NULL)
#7 C:\wamp\www\local\magento\app\code\core\Mage\Core\Model\Resource\Abstract.php(212): Varien_Db_Adapter_Pdo_Mysql->describeTable('log_visitor_inf...')
#8 C:\wamp\www\local\magento\app\code\core\Mage\Log\Model\Resource\Visitor.php(172): Mage_Core_Model_Resource_Abstract->_prepareDataForTable(Object(Varien_Object), 'log_visitor_inf...')
#9 C:\wamp\www\local\magento\app\code\core\Mage\Log\Model\Resource\Visitor.php(108): Mage_Log_Model_Resource_Visitor->_saveVisitorInfo(Object(Mage_Log_Model_Visitor))
#10 C:\wamp\www\local\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(463): Mage_Log_Model_Resource_Visitor->_afterSave(Object(Mage_Log_Model_Visitor))
#11 C:\wamp\www\local\magento\app\code\core\Mage\Core\Model\Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Log_Model_Visitor))
#12 C:\wamp\www\local\magento\app\code\core\Mage\Log\Model\Visitor.php(168): Mage_Core_Model_Abstract->save()
#13 C:\wamp\www\local\magento\app\code\core\Mage\Core\Model\App.php(1338): Mage_Log_Model_Visitor->initByRequest(Object(Varien_Event_Observer))
#14 C:\wamp\www\local\magento\app\code\core\Mage\Core\Model\App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Log_Model_Visitor), 'initByRequest', Object(Varien_Event_Observer))
#15 C:\wamp\www\local\magento\app\Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#16 C:\wamp\www\local\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#17 C:\wamp\www\local\magento\app\code\core\Mage\Core\Controller\Front\Action.php(64): Mage_Core_Controller_Varien_Action->preDispatch()
#18 C:\wamp\www\local\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(407): Mage_Core_Controller_Front_Action->preDispatch()
#19 C:\wamp\www\local\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#20 C:\wamp\www\local\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 C:\wamp\www\local\magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#22 C:\wamp\www\local\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#23 C:\wamp\www\local\magento\index.php(89): Mage::run('', 'store')
#24 {main}

1 Answer 1

1

You have the explanation in the error description Base table or view not found: 1146 Table 'finfid.log_visitor_info' doesn't exist
You must use the database you used before. Here is missing a table log_visitor_info.


In case there is the only one missing here you can find the SQL to create it :
CREATE TABLE 'log_visitor_info' ( 'visitor_id' bigint(20) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Visitor ID', 'http_referer' varchar(255) DEFAULT NULL COMMENT 'HTTP Referrer', 'http_user_agent' varchar(255) DEFAULT NULL COMMENT 'HTTP User-Agent', 'http_accept_charset' varchar(255) DEFAULT NULL COMMENT 'HTTP Accept-Charset', 'http_accept_language' varchar(255) DEFAULT NULL COMMENT 'HTTP Accept-Language', 'server_addr' bigint(20) DEFAULT NULL COMMENT 'Server Address', 'remote_addr' bigint(20) DEFAULT NULL COMMENT 'Remote Address' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Visitor Info Table'; ALTER TABLE 'log_visitor_info' ADD PRIMARY KEY ('visitor_id');

For people who have the same error if query does not work is probably because of the quotes ' that must be `. Here you can find the correct query to launch with correct quotes http://pastebin.com/jYCS2aGZ

3
  • Thank you for the solution.I ran above query on the database it says syntax error on line 1.-'visitor_id' bigint(20) UNSIGNED NOT NULL DEFAULT '0' CO' at line 1.
    – close2zero
    Commented Jan 12, 2016 at 6:53
  • Please try this query : pastebin.com/jYCS2aGZ I replace the quotes. The query is a direct extract from PhpMyAdmin so it is the correct one. Which MySQL version are you runing ? Commented Jan 12, 2016 at 8:59
  • Thank you.It fixed the current error.Please go through the link magento.stackexchange.com/questions/96994/….
    – close2zero
    Commented Jan 13, 2016 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.