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

Cleared cache and now have “PDOException Object” error
 
demeva
Jr. Member
 
Total Posts:  4
Joined:  2008-08-11
 

Having upgraded using magento connect and spending the last two days working on my site I cleared the cache and got the following error:

PDOException Object
(
[message:protected] => SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name ‘IDX_INCREMENT_ID’
[string:private] =>
[code:protected] => 42000
[file:protected] => /home/xxxxxx/xxxxxx.com/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line:protected] => 156
[trace:private] => Array
(
[0] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 156
[function] => query
[class] => PDO
[type] => ->
[args] => Array
(
[0] => ALTER TABLE `sales_order` ADD INDEX `IDX_INCREMENT_ID` (`increment_id`)
)

)

[1] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 218
[function] => raw_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => ALTER TABLE `sales_order` ADD INDEX `IDX_INCREMENT_ID` (`increment_id`)
)

)

[2] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 493
[function] => multi_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] =>
ALTER TABLE `sales_order` ADD INDEX `IDX_INCREMENT_ID` (`increment_id`);

)

)

[3] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.18-0.9.19.php
[line] => 32
[function] => run
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] =>
ALTER TABLE `sales_order` ADD INDEX `IDX_INCREMENT_ID` (`increment_id`);

)

)

[4] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 268
[args] => Array
(
[0] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.18-0.9.19.php
)

[function] => include
)

[5] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 178
[function] => _modifyResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => upgrade
[1] => 0.9.18
[2] => 0.9.20
)

)

[6] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 145
[function] => _upgradeResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => 0.9.18
[1] => 0.9.20
)

)

[7] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 120
[function] => applyUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
)

)

[8] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Config.php
[line] => 215
[function] => applyAllUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ::
[args] => Array
(
)

)

[9] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/App.php
[line] => 236
[function] => init
[class] => Mage_Core_Model_Config
[type] => ->
[args] => Array
(
[0] => Array
(
)

)

)

[10] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/Mage.php
[line] => 424
[function] => init
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
[0] =>
[1] => store
[2] => Array
(
)

)

)

[11] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/app/Mage.php
[line] => 443
[function] => app
[class] => Mage
[type] => ::
[args] => Array
(
[0] =>
[1] => store
[2] => Array
(
)

)

)

[12] => Array
(
[file] => /home/xxxxxx/xxxxxx.com/index.php
[line] => 46
[function] => run
[class] => Mage
[type] => ::
[args] => Array
(
)

)

)

[errorInfo] => Array
(
[0] => 42000
[1] => 1061
[2] => Duplicate key name ‘IDX_INCREMENT_ID’
)

)
Error in file: “/home/xxxxxx/xxxxxx.com/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.18-0.9.19.php” - SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name ‘IDX_INCREMENT_ID’

#0 /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php(286): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php(178): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘0.9.18’, ‘0.9.20’)
#2 /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php(145): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’0.9.18’, ‘0.9.20’)
#3 /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Resource/Setup.php(120): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/Config.php(215): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/xxxxxx/xxxxxx.com/app/code/core/Mage/Core/Model/App.php(236): Mage_Core_Model_Config->init(Array)
#6 /home/xxxxxx/xxxxxx.com/app/Mage.php(424): Mage_Core_Model_App->init(’’, ‘store’, Array)
#7 /home/xxxxxx/xxxxxx.com/app/Mage.php(443): Mage::app(’’, ‘store’, Array)
#8 /home/xxxxxx/xxxxxx.com/index.php(46): Mage::run()
#9 {main}

Obviously I have changed my domain name for xxxxx

I get he same error whether logging into the front or back end.

Any help would be greatly appreciated.

thanks
Demeva

 
Magento Community Magento Community
Magento Community
Magento Community
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

Did you ever solve this? I’m having the same problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
demeva
Jr. Member
 
Total Posts:  4
Joined:  2008-08-11
 

No and as you can see I got no replies either. I got fed up waiting and decided it would be quicker to clear out my server and re-install.

Hope you have more luck than me and wish you luck.

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