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

Page 1 of 3
Commands out of sync; you can’t run this command now
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

System info:

Red Hat Enterprise Linux ES 4
PHP 5.2.4
MySQL 4.1.20

I’m attempting to install Magento 0.6.13160 (full) and I’m getting a SQL error during setup (I’ve replaced my shop’s path with ## My Shop Install ##):

exception ‘Mage_Core_Exception’ with message ‘Error in file: “## My Shop Install ##/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.6.0-0.6.1.php” - Level2:Commands out of sync; you can’t run this command now’ in ## My Shop Install ##/app/Mage.php:330
Stack trace:
#0 ## My Shop Install ##/app/code/core/Mage/Core/Model/Resource/Setup.php(240): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 ## My Shop Install ##/app/code/core/Mage/Core/Model/Resource/Setup.php(133): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘0.5.8’, ‘0.6.6’)
#2 ## My Shop Install ##/app/code/core/Mage/Core/Model/Resource/Setup.php(99): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’0.5.8’, ‘0.6.6’)
#3 ## My Shop Install ##/app/code/core/Mage/Core/Model/Resource/Setup.php(82): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 ## My Shop Install ##/app/code/core/Mage/Core/Model/Config.php(135): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 ## My Shop Install ##/app/code/core/Mage/Core/Model/App.php(126): Mage_Core_Model_Config->init(NULL)
#6 ## My Shop Install ##/app/Mage.php(357): Mage_Core_Model_App->init(’base’, NULL)
#7 ## My Shop Install ##/app/Mage.php(377): Mage::app(’base’, NULL)
#8 ## My Shop Install ##/index.php(28): Mage::run(’base’)
#9 {main}

I’m pretty sure this has something to do with persistent connections/InnoDB/both but I just can’t figure out what’s going on.  There’s info at http://bugs.php.net/bug.php?id=19529 but I just can’t make sense of it.  Anyone?

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

Oh, it looks like someone else is having the same problem:

http://www.magentocommerce.com/boards/viewthread/1126/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Please try the file i’ve attached to the thread you linked above, thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

Worked like a charm.  What’d you have to change?

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

Oops, now I’m getting this under the shopping cart:

exception ‘Exception’ with message ‘Exception while saving the object: Commands out of sync; you can’t run this command now’ in www/shop/app/Mage.php:338
Stack trace:
#0 www/shop/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(336): Mage::throwException(’Exception while...’)
#1 www/shop/app/code/core/Mage/Core/Model/Abstract.php(172): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Eav_Model_Entity_Store))
#2 www/shop/app/code/core/Mage/Eav/Model/Entity/Type.php(118): Mage_Core_Model_Abstract->save()
#3 www/shop/app/code/core/Mage/Eav/Model/Entity/Abstract.php(911): Mage_Eav_Model_Entity_Type->fetchNewIncrementId(1)
#4 www/shop/app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Increment.php(32): Mage_Eav_Model_Entity_Abstract->setNewIncrementId(Object(Mage_Sales_Model_Quote))
#5 [internal function]: Mage_Eav_Model_Entity_Attribute_Backend_Increment->beforeSave(Object(Mage_Sales_Model_Quote))
#6 www/shop/app/code/core/Mage/Eav/Model/Entity/Abstract.php(582): call_user_func_array(Array, Array)
#7 www/shop/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1140): Mage_Eav_Model_Entity_Abstract->walkAttributes(’backend/beforeS...’, Array)
#8 www/shop/app/code/core/Mage/Eav/Model/Entity/Abstract.php(802): Mage_Eav_Model_Entity_Abstract->_beforeSave(Object(Mage_Sales_Model_Quote))
#9 www/shop/app/code/core/Mage/Core/Model/Abstract.php(172): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Sales_Model_Quote))
#10 www/shop/app/code/core/Mage/Checkout/Model/Session.php(58): Mage_Core_Model_Abstract->save()
#11 www/shop/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php(72): Mage_Checkout_Model_Session->getQuote()
#12 www/shop/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php(43): Mage_Checkout_Block_Cart_Sidebar->getQuote()
#13 www/shop/app/design/frontend/default/default/template/checkout/cart/sidebar.phtml(34): Mage_Checkout_Block_Cart_Sidebar->getItemCollection()
#14 www/shop/app/code/core/Mage/Core/Block/Template.php(116): include(’w...’)
#15 www/shop/app/code/core/Mage/Core/Block/Template.php(143): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#16 www/shop/app/code/core/Mage/Core/Block/Template.php(188): Mage_Core_Block_Template->renderView()
#17 www/shop/app/code/core/Mage/Core/Block/Text/List.php(38): Mage_Core_Block_Template->toHtml()
#18 www/shop/app/code/core/Mage/Core/Block/Abstract.php(437): Mage_Core_Block_Text_List->toHtml()
#19 www/shop/app/code/core/Mage/Core/Block/Abstract.php(415): Mage_Core_Block_Abstract->_getChildHtml(’right’, true)
#20 www/shop/app/design/frontend/default/default/template/page/2columns-right.phtml(81): Mage_Core_Block_Abstract->getChildHtml(’right’)
#21 www/shop/app/code/core/Mage/Core/Block/Template.php(116): include(’w...’)
#22 www/shop/app/code/core/Mage/Core/Block/Template.php(143): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#23 www/shop/app/code/core/Mage/Core/Block/Template.php(188): Mage_Core_Block_Template->renderView()
#24 www/shop/app/code/core/Mage/Core/Model/Layout.php(401): Mage_Core_Block_Template->toHtml()
#25 www/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(303): Mage_Core_Model_Layout->getOutput()
#26 www/shop/app/code/core/Mage/Cms/Helper/Page.php(63): Mage_Core_Controller_Varien_Action->renderLayout()
#27 www/shop/app/code/core/Mage/Cms/controllers/IndexController.php(26): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘home’)
#28 www/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(326): Mage_Cms_IndexController->indexAction()
#29 www/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(147): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#30 www/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(164): Mage_Core_Controller_Varien_Router_Standard->match(Object(Zend_Controller_Request_Http))
#31 www/shop/app/Mage.php(378): Mage_Core_Controller_Varien_Front->dispatch()
#32 www/shop/index.php(28): Mage::run(’base’)
#33 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Great!

Just added another free_result before multi_query to make sure the state is correct for next statement execution, on line 115.
Will rework more this part later.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Are you using mysqli for core_write connection?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

I’ve updated the files in the linked post, please try to re-download

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

Still no luck on the block below the shopping cart.  Everything else I’ve played with works fine, though.

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

Also got: “Exception while saving the object: Commands out of sync; you can’t run this command now” when trying to change settings in system.

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

Now that I’ve played with it some more I’m noticing that error all over the place still.  Anyone?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ngenworks
Jr. Member
 
Total Posts:  6
Joined:  2007-10-22
 

Same here. Posted about this with more details elsewhere. I can’t update the design under configuration…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

In app/etc/config.xml under [config / global / resoures / default_write / type] do you have pdo_mysql or mysqli ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 

It’s PDO, but I just changed it to mysqli and it’s the same issue.

<default_setup>
<connection>
<host>localhost</host>
<username></username>
<password/>
<dbname>magento</dbname>

<model>mysql4</model>
<initStatements>SET NAMES utf8</initStatements>
<type>mysqli</type>
<active>0</active>
</connection>
</default_setup>
<default_write>
<connection>
<host>localhost</host>
<username></username>
<password/>
<dbname>magento</dbname>

<model>mysql4</model>
<initStatements>SET NAMES utf8</initStatements>
<type>pdo_mysql</type>
<active>0</active>
</connection>
</default_write>
<default_read>
<connection>
<use>default_write</use>
</connection>
</default_read>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roderik
Member
 
Avatar
Total Posts:  35
Joined:  2007-09-15
Belgium
 

Hmmm,

the version on my home server, where i installed and develloped didn’t have this problem. I put the db online and all files (including the fix posted in this thread) and the shopping cart gives me:

exception ‘Exception’ with message ‘Exception while saving the object: Commands out of sync; you can’t run this command now’ in /home/usr1/bigslick/public_html/app/Mage.php:338
Stack trace:
#0 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(336): Mage::throwException(’Exception while...’)
#1 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Model/Abstract.php(172): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Eav_Model_Entity_Store))
#2 /home/usr1/bigslick/public_html/app/code/core/Mage/Eav/Model/Entity/Type.php(118): Mage_Core_Model_Abstract->save()
#3 /home/usr1/bigslick/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(911): Mage_Eav_Model_Entity_Type->fetchNewIncrementId(1)
#4 /home/usr1/bigslick/public_html/app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Increment.php(32): Mage_Eav_Model_Entity_Abstract->setNewIncrementId(Object(Mage_Sales_Model_Quote))
#5 [internal function]: Mage_Eav_Model_Entity_Attribute_Backend_Increment->beforeSave(Object(Mage_Sales_Model_Quote))
#6 /home/usr1/bigslick/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(582): call_user_func_array(Array, Array)
#7 /home/usr1/bigslick/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1140): Mage_Eav_Model_Entity_Abstract->walkAttributes(’backend/beforeS...’, Array)
#8 /home/usr1/bigslick/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(802): Mage_Eav_Model_Entity_Abstract->_beforeSave(Object(Mage_Sales_Model_Quote))
#9 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Model/Abstract.php(172): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Sales_Model_Quote))
#10 /home/usr1/bigslick/public_html/app/code/core/Mage/Checkout/Model/Session.php(58): Mage_Core_Model_Abstract->save()
#11 /home/usr1/bigslick/public_html/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php(72): Mage_Checkout_Model_Session->getQuote()
#12 /home/usr1/bigslick/public_html/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php(43): Mage_Checkout_Block_Cart_Sidebar->getQuote()
#13 /home/usr1/bigslick/public_html/app/design/frontend/default/default/template/checkout/cart/sidebar.phtml(34): Mage_Checkout_Block_Cart_Sidebar->getItemCollection()
#14 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Template.php(116): include(’/home/usr1/bigs...’)
#15 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Template.php(143): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#16 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Template.php(188): Mage_Core_Block_Template->renderView()
#17 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Text/List.php(38): Mage_Core_Block_Template->toHtml()
#18 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Abstract.php(437): Mage_Core_Block_Text_List->toHtml()
#19 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Abstract.php(415): Mage_Core_Block_Abstract->_getChildHtml(’right’, true)
#20 /home/usr1/bigslick/public_html/app/design/frontend/default/default/template/page/2columns-right.phtml(81): Mage_Core_Block_Abstract->getChildHtml(’right’)
#21 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Template.php(116): include(’/home/usr1/bigs...’)
#22 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Template.php(143): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#23 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Block/Template.php(188): Mage_Core_Block_Template->renderView()
#24 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Model/Layout.php(401): Mage_Core_Block_Template->toHtml()
#25 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(303): Mage_Core_Model_Layout->getOutput()
#26 /home/usr1/bigslick/public_html/app/code/core/Mage/Catalog/controllers/CategoryController.php(54): Mage_Core_Controller_Varien_Action->renderLayout()
#27 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(326): Mage_Catalog_CategoryController->viewAction()
#28 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(147): Mage_Core_Controller_Varien_Action->dispatch(’view’)
#29 /home/usr1/bigslick/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(164): Mage_Core_Controller_Varien_Router_Standard->match(Object(Zend_Controller_Request_Http))
#30 /home/usr1/bigslick/public_html/app/Mage.php(378): Mage_Core_Controller_Varien_Front->dispatch()
#31 /home/usr1/bigslick/public_html/index.php(28): Mage::run(’base’)
#32 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roderik
Member
 
Avatar
Total Posts:  35
Joined:  2007-09-15
Belgium
 

oh, i went from a ubuntu gutsy ( PHP 5.2.3-1ubuntu6 / MYSQL 5.0.45-Debian_1ubuntu3-log) to a redhat (PHP:  5.2.4 / MySQL 4.1.21-standard)

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3