doushan6161 2017-02-16 17:36
浏览 36
已采纳

在本地获取实时Magento站点时出错

First I like to say I'm new to Magento, and have been given the task to work on the site but I'm having an issue taking the live site and installing locally for development work. Here is the errors I'm receiving when trying to install site locally.

Fatal error: Uncaught Error: Function name must be a string in /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/Layout.php:556 Stack trace: #0 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput() #1 /Applications/MAMP/htdocs/site/app/code/core/Mage/Install/controllers/WizardController.php(120): Mage_Core_Controller_Varien_Action->renderLayout() #2 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Install_WizardController->beginAction() #3 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('begin') #4 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

5 /Applications/MAMP/htdocs/site in /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/Layout.php

on line 556

I've followed these steps so far:

  1. Download the magento files using any ftp client.
  2. Export the database from live server.
  3. Put the downloaded Magento files in your localhost root folder.
  4. Create a blank database in my local computer and import the database backup that I exported from the live one.
  5. Delete/Rename the file app/etc/local.xml
  6. Change secure and unsecure URL's in 'core_config_data' table.

Any help will be appreciated as I really need to get this working.

Using Magento version 1.9.0.1 and line 556 is the

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

Here is the whole function:

public function getOutput()
     {
         $out = '';
         if (!empty($this->_output)) {
             foreach ($this->_output as $callback) {
                 $out .= $this->getBlock($callback[0])->$callback[1]();
             }
         }

         return $out;
     }

This is the exception log printout:

Exception: load error: failed to find /var/www/vhosts/siteuk.virtualsplash.com/httpdocs/skin/frontend/mtbelano/default/css/styles.less in /Applications/MAMP/htdocs/site/lib/Soczed/less/lessc.inc.php:2379
Stack trace:
#0 /Applications/MAMP/htdocs/site/lib/Soczed/less/lessc.inc.php(2528): lessc->__construct('/var/www/vhosts...')
#1 /Applications/MAMP/htdocs/site/app/code/community/Soczed/Less/Model/Observer.php(178): lessc::cexecute(Array, false, Array, Array)
#2 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/App.php(1338): Soczed_Less_Model_Observer->beforeLayoutRender(Object(Varien_Event_Observer))
#3 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Soczed_Less_Model_Observer), 'beforeLayoutRen...', Object(Varien_Event_Observer))
#4 /Applications/MAMP/htdocs/site/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#5 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(384): Mage::dispatchEvent('controller_acti...')
#6 /Applications/MAMP/htdocs/site/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#7 /Applications/MAMP/htdocs/site/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'new_home_page')
#8 /Applications/MAMP/htdocs/site/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'new_home_page')
#9 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#10 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 /Applications/MAMP/htdocs/site/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#14 /Applications/MAMP/htdocs/site/index.php(94): Mage::run('', 'store')
#15 {main}
  • 写回答

2条回答 默认 最新

  • duanrenchuo9244 2017-02-21 08:53
    关注

    Change the line $out .= $this->getBlock($callback[0])->$callback[1](); with the below-mentioned code

    $out .= $this->getBlock($callback[0])->{$callback[1]}();
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测