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

Base table or view already exists: 1050 Table ‘api_session’ already exists
 
thenextwave
Jr. Member
 
Total Posts:  2
Joined:  2009-08-17
 

Am getting this error on my site. How do I get rid of this issue please?

Error in file: “/home/mydomain/public_html/magento/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘api_session’ already exists
Trace:
#0 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(292): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(179): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘0.7.1’, ‘0.8.1’)
#2 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(146): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’0.7.1’, ‘0.8.1’)
#3 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(121): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Config.php(263): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Config.php(289): Mage_Core_Model_Config->init(Object(Mage_Core_Model_Config_Options))
#6 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Config.php(429): Mage_Core_Model_Config->reinit(Object(Mage_Core_Model_Config_Options))
#7 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Config.php(510): Mage_Core_Model_Config->_loadSectionCache(’stores_french’)
#8 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Config.php(553): Mage_Core_Model_Config->getSectionNode(Array)
#9 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Store.php(207): Mage_Core_Model_Config->getNode(’stores/french/c...’)
#10 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/Store.php(240): Mage_Core_Model_Store->getConfig(’catalog/price/s...’)
#11 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/App.php(426): Mage_Core_Model_Store->initConfigCache()
#12 /home/mydomain/public_html/magento/app/code/core/Mage/Core/Model/App.php(268): Mage_Core_Model_App->_initStores()
#13 /home/mydomain/public_html/magento/app/Mage.php(434): Mage_Core_Model_App->init(’’, ‘store’, Array)
#14 /home/mydomain/public_html/magento/app/Mage.php(455): Mage::app(’’, ‘store’, Array)
#15 /home/mydomain/public_html/magento/index.php(65): Mage::run()
#16 {main}

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
hungdo1988
Jr. Member
 
Total Posts:  2
Joined:  2009-11-23
 

Sugguest:
step 1: open file :..\magento\app\code\core\Mage\Core\Model\Session\Abstract\Varien.php
Find:
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);
and replace, and dont forget to remove comma after $this->getCookie()->getPath() :
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
// $this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
Try your best.

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