Just last week my Demo Server crashed and I thanks to my Team Oleg for his hard work to get back the demo server back. But once it is back the scenario was different. Before we are running php5 version but with latest ubuntu 16 version only php7 and mysqli support and My all magento demo websites are down. After lots of RND I found if we change this simple 2 files we are back with php7 version too. So I would like to share with you the changes you need to do on your magento 1.9.xxx version o magento.

Step 1.

Open This file app\code\core\Mage\Core\Model\Store\Group.php

Go To Line No :  275

Code Look Like this

public function setWebsite(Mage_Core_Model_Website $website)

change to

public function setWebsite(Mage_Core_Model_Website $website=null)

Step 2.

Open This file app\code\core\Mage\Core\Model\Layout.php

Go To Line No :  555

Code Look Like this

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

change to

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

If you facing problem finding the files or code. You don’t have to worry I have another solution for you.

Download this Subikar-Magento1.9.xx-php7-fix  unzip And Just upload to your magento root folder.

Note: This Zip file is Password protected. And Password : indiaonit

One thought on “Magento 1.9 Version Php 7 Comparability Fix”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.