cancel
Showing results for 
Search instead for 
Did you mean: 

Magento broken after mysql upgrade. Now getting errors in apache error log if anyone can please help

Magento broken after mysql upgrade. Now getting errors in apache error log if anyone can please help

Hi after upgrading mysql apache is throwing these error when I visit my Magento 1.9 CE  website (which doesn't load up and is just blank):

 

[Sun Aug 21 15:25:49.236402 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Function name must be a string in /home/public_html/app/code/core/Mage/Core/Model/Layout.php:555
[Sun Aug 21 15:25:49.236434 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: Stack trace:
[Sun Aug 21 15:25:49.236438 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: #0 /home/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
[Sun Aug 21 15:25:49.236441 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: #1 /home/public_html/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
[Sun Aug 21 15:25:49.236444 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: #2 /home/public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
[Sun Aug 21 15:25:49.236448 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: #3 /home/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
[Sun Aug 21 15:25:49.236451 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: #4 /home/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
[Sun Aug 21 15:25:49.236454 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr: #5 /home/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
[Sun Aug 21 15:25:49.236457 2016] [fcgid:warn] [pid 15353] [client 192.168.0.1:48510] mod_fcgid: stderr:  in /home/public_html/app/code/core/Mage/Core/Model/Layout.php on line 555

Any help really appreciated to fix this Smiley Happy

3 REPLIES

Re: Magento broken after mysql upgrade. Now getting errors in apache error log if anyone can please

Its not recommended to edit the core file. Editing core files causes a lot of problems while updating magento. You should override the file which you have to edit. In this case error can be fixed by fixing following line in magento_root /app\code\core\Mage\Core\Model\Layout.php
 
$out .= $this->getBlock($callback[0])->$callback[1]();
 
change it to 
 
$out .= $this->getBlock($callback[0])->{$callback[1]}();
 
 

Re: Magento broken after mysql upgrade. Now getting errors in apache error log if anyone can please

Hi thanks I did the first two steps but wasn't sure what the author means by

 

"then I had to create the __call magic method to override the parent class’ behavior:"

 

I tried adding the next couple of steps to the same /Model/Session/Abstract/Varien.php file but I still can't login to the backend. Where should those other changes go?

 

Thanks again for your help.

Re: Magento broken after mysql upgrade. Now getting errors in apache error log if anyone can please

The other thing I also noticed is if I do the first step and edit the core Layout.php file the site loads up. But if I then revert that change and copy the file to /app/code/local/Mage/Core/Model/Layout.php with the updated change the site still doesn't load up... So how do I also manage to get the override to work?

 

Thanks again.