4

I am facing a issue while trying to install magento.

I am getting the following error:

Fatal error: Uncaught Error: Function name must be a string in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php:555
Stack trace:
#0 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#1 /var/www/html/magento/app/code/core/Mage/Install/controllers/WizardController.php(120): Mage_Core_Controller_Varien_Action->renderLayout()
#2 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Install_WizardController->beginAction()
#3 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('begin')
#4 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5  /var/www/html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /var/www/html/magento/app/Mage.php(682): Mage_Core_Model_App- in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php on line 555

Configuration details:

  • OS: ubuntu 15.10
  • Apache: 2.4.18
  • php: 7.0.2
  • mysql: 5.7.10
12

Magento 1.x is not fully compatible with PHP 7, see: Is Magento ready for PHP 7?

This specific bug can be fixed, by overriding Mage_Core_Model_Layout and change line 555 from:

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

to

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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