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 2 of 3
Commands out of sync; you can’t run this command now
 
ngenworks
Jr. Member
 
Total Posts:  6
Joined:  2007-10-22
 

I went straight to an online setup (no previous or different version of either PHP or MySQL) and I’m still getting the same error. Help! No products can be pulled in.

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

Ok, i “fixed” it!

I noticed (var_dump is my friend) that the same code run at my local machine was using a pdo exception at the place of the exception in Abstract.php, and a mysqli at the live server. I cleaned the var folder, so i believe somewhere the Zend framework or the Varien code descides based on some criteria to use mysqli over pdo.

My config.xml had the following and the type parameter is not overruled in local.xml

<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>

and the code in Abstract.php did

$write $this->getConnection('write');

so i believe it should return a pdo connection to save aka write

But seeing that someway it used the mysqli (or setup connection) i just changed the mysqli there to pdo_mysql and tadaa, error gone.Or at least the error in the shopping cart is gone, don’t really know if it doens’t resurface somewhere else but at least we are one step further

R

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

The same seemed to fix just about everything for me as well.  The only thing I haven’t been able to do yet is delete a store.  I want to get rid of the default German and French stores…

 
Magento Community Magento Community
Magento Community
Magento Community
 
crounauer
Jr. Member
 
Total Posts:  2
Joined:  2007-11-01
Aberdeen Scotland
 

Hello,

Firstly, this is a truly amazing program and see a bright bright future for it smile

As a newbie to the file structure and “magento” as a whole is it possible to request that absolute file references are given so that us who are not familiar with the file structure can easily locate and implement fixes.

This will certainly save me a heap of time.

I apologise if this is in the incorrect location within the forum - if so perhaps a moderator could move it to the correct location please.

Thanks,
Simon

 
Magento Community Magento Community
Magento Community
Magento Community
 
Chaitanya
Jr. Member
 
Total Posts:  5
Joined:  2007-11-05
 

Hi

I am still facing the issue. I am using mysqli in config.xml
Is anybody working on the issue?

Updates- I have tried the new files provided on this thread but no success…

This is very core issue and we are stuck…

Please help as we are not able to proceed…

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 
crounauer - 02 November 2007 01:46 AM

As a newbie to the file structure and “magento” as a whole is it possible to request that absolute file references are given so that us who are not familiar with the file structure can easily locate and implement fixes.

The config file is app/etc/config.xml

Make Roderik’s changes in that file and see if it fixes it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 
Chaitanya - 05 November 2007 09:00 AM

I have tried the new files provided on this thread but no success…

Have you tried changing from mysqli to pdo_mysql?  That fixed it for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
inxilpro
Jr. Member
 
Total Posts:  17
Joined:  2007-10-22
 
Roderik - 23 October 2007 10:50 AM

Ok, i “fixed” it!

Roderik,

Are you able to delete stores?  I want to delete the default international stores ‘cause our site will be US only, but I can’t.  Everything else seems to work fine.  I’m just curious if you’re having the same issue or if it’s specific to my installation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Chaitanya
Jr. Member
 
Total Posts:  5
Joined:  2007-11-05
 

Hi inxilpro

I cannot use pdo_sql as my server will not allow that configuration. As shared hosting may impact other servers, so I have to get this fixed for mysqli…

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
PeteN
Jr. Member
 
Total Posts:  2
Joined:  2007-11-05
 

I have exactly the same problem - cant use pdo_sql, same error as above, tried all the fixes.. nada..

btw: We have developed many shopping carts using oscommerece and have built some quite extensive extra functionality for our clients - looking forward to something a little more robust and better coded!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Chaitanya
Jr. Member
 
Total Posts:  5
Joined:  2007-11-05
 

Any luck?
All stuff stucked without this…

Magento Developers Please help for this core issue…

I guess this must be pretty common error!

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

@inxilpro: to remove a store for now run this in your database (replace @store_id with your store numeric id):

delete from core_store where store_id=@store_id
delete from core_config_data where scope='stores' and scope_id=@store_id;
Still finalizing the implications of deleting of the store.

@Chaitanya: it looks like the fix worked for others.. Could you try to re-download the files, there were updated during the course of the thread.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Chaitanya
Jr. Member
 
Total Posts:  5
Joined:  2007-11-05
 

Dear Moshe

Thanks for your kind attention and reply..

I am using updated version of files provided by you but still I am getting error.
When I access Home page… this is error Stack…

I am using MySQL 4.1

Following error comes under shopping cart and also at many places when I try to save something. Sometimes save works but in many cases, it does not work.

exception 'Exception' with message 'Exception while saving the object: Commands out of sync; you can't run this command now' in /home/rootdir/public_html/magento/app/Mage.php:338
Stack trace:

#0 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(336): Mage::throwException('
Exception while...')
#1 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Model/Abstract.php(172): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Eav_Model_Entity_Store))
#2 /home/rootdir/public_html/magento/app/code/core/Mage/Eav/Model/Entity/Type.php(118): Mage_Core_Model_Abstract->save()
#3 /home/rootdir/public_html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(911): Mage_Eav_Model_Entity_Type->fetchNewIncrementId(1)
#4 /home/rootdir/public_html/magento/app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Increment.php(32): Mage_Eav_Model_Entity_Abstract->setNewIncrementId(Object(Mage_Sales_Model_Quote))
#5 /home/rootdir/public_html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(582): Mage_Eav_Model_Entity_Attribute_Backend_Increment->beforeSave(Object(Mage_Sales_Model_Quote))
#6 /home/rootdir/public_html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1140): Mage_Eav_Model_Entity_Abstract->walkAttributes(Array, Array)
#7 /home/rootdir/public_html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(802): Mage_Eav_Model_Entity_Abstract->_beforeSave('
backend/beforeS...', Array)
#8 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Model/Abstract.php(172): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Sales_Model_Quote))
#9 /home/rootdir/public_html/magento/app/code/core/Mage/Checkout/Model/Session.php(58): Mage_Core_Model_Abstract->save(Object(Mage_Sales_Model_Quote))
#10 /home/rootdir/public_html/magento/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php(72): Mage_Checkout_Model_Session->getQuote()
#11 /home/rootdir/public_html/magento/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php(43): Mage_Checkout_Block_Cart_Sidebar->getQuote()
#12 /home/rootdir/public_html/magento/app/design/frontend/default/default/template/checkout/cart/sidebar.phtml(34): Mage_Checkout_Block_Cart_Sidebar->getItemCollection()
#13 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Template.php(116): include('
/home/rootdir/p...')
#14 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Template.php(143): Mage_Core_Block_Template->fetchView()
#15 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Template.php(188): Mage_Core_Block_Template->renderView('
frontend/defaul...')
#16 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Text/List.php(38): Mage_Core_Block_Template->toHtml()
#17 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Abstract.php(437): Mage_Core_Block_Text_List->toHtml()
#18 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Abstract.php(415): Mage_Core_Block_Abstract->_getChildHtml()
#19 /home/rootdir/public_html/magento/app/design/frontend/default/default/template/page/2columns-right.phtml(81): Mage_Core_Block_Abstract->getChildHtml('
right', true)
#20 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Template.php(116): include('
/home/rootdir/p...')
#21 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Template.php(143): Mage_Core_Block_Template->fetchView('
right')
#22 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Block/Template.php(188): Mage_Core_Block_Template->renderView('
frontend/defaul...')
#23 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(401): Mage_Core_Block_Template->toHtml()
#24 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(303): Mage_Core_Model_Layout->getOutput()
#25 /home/rootdir/public_html/magento/app/code/core/Mage/Cms/Helper/Page.php(63): Mage_Core_Controller_Varien_Action->renderLayout()
#26 /home/rootdir/public_html/magento/app/code/core/Mage/Cms/controllers/IndexController.php(26): Mage_Cms_Helper_Page->renderPage()
#27 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(326): Mage_Cms_IndexController->indexAction(Object(Mage_Cms_IndexController), '
home')
#28 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(147): Mage_Core_Controller_Varien_Action->dispatch()
#29 /home/rootdir/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(164): Mage_Core_Controller_Varien_Router_Standard->match('
index')
#30 /home/rootdir/public_html/magento/app/Mage.php(378): Mage_Core_Controller_Varien_Front->dispatch(Object(Zend_Controller_Request_Http))
#31 /home/rootdir/public_html/magento/index.php(28): Mage::run()
#32 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
PeteN
Jr. Member
 
Total Posts:  2
Joined:  2007-11-05
 

I have exactly the same problems as Chaitanya it seems. I am using the latest version of the code.

I am running PHP 5 in CGI mode with MySQL 4.1 and MySQLi interface. PHP5 is using CGI as our other php sites are using php4.

I got round the install issues with the previous fixes, but not the app itself - lots of errors in lots of places - same error as Chaitanya in shopping cart.

Moshe, what do you need to know to help debug this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vger
Jr. Member
 
Total Posts:  5
Joined:  2007-09-11
United Kingdom
 

I’ll come back to Magento in a few months time - when something about it works.

Vger

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