I was transferring my magento website from server to local and changed my databse credential in app->etc->local.xml

Here is local.xml file

          <initStatements><![CDATA[SET NAMES utf8]]></initStatements>

When i running my website then it showing the following error message

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lalcointeriors.sl_less_file' doesn't exist

#0 C:\xampp\htdocs\lalcointeriors\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\xampp\htdocs\lalcointeriors\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 C:\xampp\htdocs\lalcointeriors\lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 C:\xampp\htdocs\lalcointeriors\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 C:\xampp\htdocs\lalcointeriors\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 C:\xampp\htdocs\lalcointeriors\lib\Zend\Db\Adapter\Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
#6 C:\xampp\htdocs\lalcointeriors\lib\Varien\Data\Collection\Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
#7 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Model\Resource\Db\Collection\Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
#8 C:\xampp\htdocs\lalcointeriors\lib\Varien\Data\Collection\Db.php(566): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 C:\xampp\htdocs\lalcointeriors\app\code\community\Soczed\Less\Model\Observer.php(112): Varien_Data_Collection_Db->load()
#10 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Model\App.php(1338): Soczed_Less_Model_Observer->beforeLayoutRender(Object(Varien_Event_Observer))
#11 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Model\App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Soczed_Less_Model_Observer), 'beforeLayoutRen...', Object(Varien_Event_Observer))
#12 C:\xampp\htdocs\lalcointeriors\app\Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#13 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Controller\Varien\Action.php(384): Mage::dispatchEvent('controller_acti...')
#14 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Cms\Helper\Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#15 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Cms\Helper\Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(SkyMagento_Redirect_IndexController), 'lalco-home-page')
#16 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Cms\controllers\IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(SkyMagento_Redirect_IndexController), 'lalco-home-page')
#17 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Cms_IndexController->indexAction()
#18 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#19 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#21 C:\xampp\htdocs\lalcointeriors\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#22 C:\xampp\htdocs\lalcointeriors\index.php(92): Mage::run('', 'store')
#23 {main}

Please help me to find the solution . It already takes my whole day

  • I checked my live db.there is no lalcointeriors.sl_less_file – xr33dx Nov 10 '16 at 7:31
  • You need to find the setup file related sl_less_file in core_resource table when you get it, just delete that entry in core_resource table and refresh the page, then table automatically created. – Rajan Soni Nov 10 '16 at 7:48
  • @Rajan there is less_setup file only no sl_less_file are there – xr33dx Nov 10 '16 at 8:00
  • Yes, delete entry of less_setup then refresh page, table automatically created and also add less_Setup setup in core_resource table. – Rajan Soni Nov 10 '16 at 9:04

There are two solution for that

First Solution


there will be sql script run that code in phpmyadmin.

Second Solution

go to your core_resource table and delete the module entry of it.

Remove you var/cache folder.

| improve this answer | |
  • I follow the first solution but it not working same problem showing – xr33dx Nov 10 '16 at 7:56
  • did the table created? and remove var/cache folder too after table is created – Fme Extensions Nov 10 '16 at 7:58
  • table is not created and i remove the cache folder – xr33dx Nov 10 '16 at 7:59
  • here is the sql query which i triggered. CREATE TABLE {$installer->getTable('less/file')} ( file_id int(10) unsigned NOT NULL AUTO_INCREMENT, path text character set utf8 NOT NULL, cache text character set utf8 default NULL, use_global_variables tinyint(1) unsigned NOT NULL default 1, force_global_variables tinyint(1) unsigned NOT NULL default 0, custom_variables text character set utf8 default NULL, force_rebuild tinyint(1) unsigned NOT NULL default 0, PRIMARY KEY (file_id) ) – xr33dx Nov 10 '16 at 8:03
  • . now it showing this error message. Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Model\Layout.php:555 Stack trace: #0 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput() #1 C:\xampp\htdocs\lalcointeriors\app\code\core\Mage\Cms\Helper\Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout() – xr33dx Nov 10 '16 at 8:14

Try this,

While import DB in local this table is missed lalcointeriors.sl_less_file check your Live DB And Local DB all table available or not

Fatal error: Uncaught Error: Function name must be a string in ... app\code\core\Mage\Core\Model\Layout.php:555 ...

This error was easy to fix because the problem was in the following line:

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

Instead it should be:

$out .= $this->getBlock($callback[0])->{$callback[1]}();
| improve this answer | |
  • I checked my live db.there is no lalcointeriors.sl_less_file – xr33dx Nov 10 '16 at 7:32
  • this is any custom extension – Magento 2 Nov 10 '16 at 7:32
  • What I do for this. I am new on magento please help me to find the solution – xr33dx Nov 10 '16 at 7:33
  • Did you check both live local DB all table are existing or not – Magento 2 Nov 10 '16 at 7:37
  • Check my updated question. for checking you edit core file if it's work then change i – Magento 2 Nov 10 '16 at 8:18

Check all your custom module code and try to find table name sl_less_file.

Take that module setup folder name and search that name in core resource table and remove that record. Also disable your cache first and then check.


Create this table in your database

CREATE TABLE sl_less_file (
    `file_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `path` text character set utf8 NOT NULL,
    `cache` text character set utf8 default NULL,
    `use_global_variables` tinyint(1) unsigned NOT NULL default 1,
    `force_global_variables` tinyint(1) unsigned NOT NULL default 0,
    `custom_variables` text character set utf8 default NULL,
    `force_rebuild` tinyint(1) unsigned NOT NULL default 0,
    PRIMARY KEY (`file_id`)
| improve this answer | |
  • now its showing this error. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lalcointeriors.sales_flat_quote_address' doesn't exist – xr33dx Nov 10 '16 at 9:33
  • Then check this table is in your DB or not "sales_flat_quote_address". If not then your DB is not proper. Than download the DB again and set it again – Ashish Jagnani Nov 10 '16 at 10:37
  • @xr33dx, is your issue resolved ? – Ashish Jagnani Nov 11 '16 at 5:37
  • no i am working on it – xr33dx Nov 11 '16 at 9:41

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.