3

Since I moved from a shared hosting to a VPS hosting plan to get a lot more memory for my website, I have had an issue where i'm completely unable to login to the admin of magento.

I'm completely unable to do anything with my website, I was wondering if anyone knows what would cause this and how I can fix it?

I get the following error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'SUM((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(ma' in 'field list', query was: SELECT `SUM((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table`.`base_to_global_rate)` AS `lifetime`, `AVG((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table`.`base_to_global_rate)` AS `average` FROM `sales_flat_order` AS `main_table` WHERE (main_table.status NOT IN('canceled')) AND (main_table.state NOT IN('new', 'pending_payment'))

Trace:

Trace:
#0 includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 includes/src/__default.php(65491): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 includes/src/__default.php(54710): Zend_Db_Statement->execute(Array)
#3 includes/src/__default.php(55747): Zend_Db_Adapter_Abstract->query('SELECT `SUM((IF...', Array)
#4 includes/src/__default.php(56683): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `SUM((IF...', Array)
#5 includes/src/__default.php(54967): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `SUM((IF...', Array)
#6 includes/src/__default.php(32325): Zend_Db_Adapter_Abstract->fetchAll('SELECT `SUM((IF...', Array)
#7 includes/src/__default.php(32951): Varien_Data_Collection_Db->_fetchAll('SELECT `SUM((IF...', Array)
#8 includes/src/__default.php(32157): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 includes/src/Mage_Adminhtml_Block_Dashboard_Sales.php(65): Varien_Data_Collection_Db->load()
#10 includes/src/__default.php(1987): Mage_Adminhtml_Block_Dashboard_Sales->_prepareLayout()
#11 includes/src/__default.php(28460): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#12 includes/src/Mage_Adminhtml_Block_Dashboard.php(54): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#13 includes/src/__default.php(1987): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#14 includes/src/__default.php(28460): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#15 includes/src/__default.php(28476): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#16 includes/src/__default.php(28243): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#17 includes/src/__default.php(28209): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#18 includes/src/__default.php(28214): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#19 includes/src/__default.php(14198): Mage_Core_Model_Layout->generateBlocks()
#20 includes/src/__default.php(14123): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#21 includes/src/Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#22 app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#23 includes/src/__default.php(14272): Mage_Adminhtml_DashboardController->indexAction()
#24 includes/src/__default.php(18726): Mage_Core_Controller_Varien_Action->dispatch('index')
#25 includes/src/__default.php(18256): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#26 includes/src/__default.php(21084): Mage_Core_Controller_Varien_Front->dispatch()
#27 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#28 index.php(83): Mage::run('', 'store')
#29 {main}

The error and trace can also be seen here on pastebin: http://pastebin.com/V9Htwmfj

2
  • 1
    I see by the trace that you have the compiler turned on. Try turning it off and see if this still happens
    – 7ochem
    Commented Jan 16, 2016 at 12:08
  • Any way to do this without logging in to magento admin?
    – Guadostar
    Commented Jan 16, 2016 at 12:13

1 Answer 1

3

I reckon you should disable the compilation first. You can do it without the admin by following this post: https://stackoverflow.com/questions/8538154/magento-died-after-compilation-how-to-disable-using-compiled-files-without-admi

Once you're done log back in to your admin, flush the cache and recompile should fix your problem.

2
  • Haha, I was just about to comment that same SO answer of Alan Storm ;)
    – 7ochem
    Commented Jan 16, 2016 at 12:29
  • Yeah his explanations are always clear and provides deep details about our Magento works. Commented Jan 16, 2016 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.