1

This question already has an answer here:

I am trying to install magento on linux. While installing i am getting following error. Same installation file i can install on windows xampp.

Fatal error: Uncaught Error: Function name must be a string in /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Layout.php:555 
Stack trace: #0 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()    
 #1 /opt/lampp/htdocs/magento/app/code/core/Mage/Install/controllers/WizardController.php(120): Mage_Core_Controller_Varien_Action->renderLayout() 
 #2 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Install_WizardController->beginAction()
 #3 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('begin')
 #4 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) 
 #5 /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
 #6 /opt/lampp/htdocs/magento/app/Mag in/opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Layout.php on line 555

marked as duplicate by Raphael at Digital Pianism, Fabian Schmengler, Qaisar Satti, philwinkle Apr 7 '16 at 13:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • When you are going for search a answer , the first thing is question title and you can differentiate the article.. Anyway i had already accepted answer. – Kishor Apr 5 '16 at 8:13
  • The cause of this problem is that you are using PHP 7 and Magento 1 is not fully compatible. The solution can be found in the linked duplicate even if your error message is not mentioned there. – Fabian Schmengler Apr 5 '16 at 8:38
4

move file

/app/code/core/Mage/Core/Model/Layout.php

to

/app/code/local/Mage/Core/Model/Layout.php

and change code at line no 555.

$out .= $this->getBlock($callback[0])->$callback[1]();

to

$out .= $this->getBlock($callback[0])->{$callback[1]}();

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