Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘log_visitor_online’ already exists
 
Duffdaddy
Jr. Member
 
Total Posts:  26
Joined:  2009-11-26
 

I keep getting this… whenever I try and make changes to the backend. I’m running 1.3.2.4 and I installed the 1.2.0 sample data.

---
Error in file: “/var/users/econet/shop.arthritis.org.nz/htdocs/app/code/core/Mage/Log/sql/log_setup/mysql4-upgrade-0.7.4-0.7.5.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘log_visitor_online’ already exists
---

is the database the wrong version?
I also get this on the report page sometimes too after seeing the message above…

----
Cannot send headers; headers already sent in /var/users/econet/shop.arthritis.org.nz/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php, line 291
Trace:
#0 /var/users/econet/shop.arthritis.org.nz/htdocs/lib/Zend/Controller/Response/Abstract.php(147): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /var/users/econet/shop.arthritis.org.nz/htdocs/app/code/core/Mage/Adminhtml/Controller/Action.php(340): Zend_Controller_Response_Abstract->setRedirect(’http://shop.art...’)
#2 /var/users/econet/shop.arthritis.org.nz/htdocs/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(164): Mage_Adminhtml_Controller_Action->_redirect(’*/*/edit’, Array)
#3 /var/users/econet/shop.arthritis.org.nz/htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Adminhtml_System_ConfigController->saveAction()
#4 /var/users/econet/shop.arthritis.org.nz/htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch(’save’)
#5 /var/users/econet/shop.arthritis.org.nz/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#6 /var/users/econet/shop.arthritis.org.nz/htdocs/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#7 /var/users/econet/shop.arthritis.org.nz/htdocs/index.php(65): Mage::run()
#8 {main}
----

 
Magento Community Magento Community
Magento Community
Magento Community
 
frumallover
Jr. Member
 
Total Posts:  1
Joined:  2009-12-24
 

This is what i did to get past the errors. I moved everything in /app/code/core/Mage/Api/sql/api_setup into a sub directory i created named “old”.

/app/code/core/Mage/Api/sql/api_setup# ls

mysql4-install-0.7.0.php  mysql4-upgrade-0.7.0-0.7.1.php  mysql4-upgrade-0.8.0-0.8.1.php

/app/code/core/Mage/Api/sql/api_setup# mkdir old

/app/code/core/Mage/Api/sql/api_setup# mv *.php old

After I moved them, the installation went fine. I had previously imported magento_sample_data_for_1.2.0.sql into my database.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Duffdaddy
Jr. Member
 
Total Posts:  26
Joined:  2009-11-26
 

thanks, will keep that in mind for my next install. much appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top