site is very very slow and we got this error in backend:

General error: 2006 MySQL server has gone away, query was: SELECT `main_table`.* FROM `core_config_data` AS `main_table` WHERE (`value` LIKE '{{base_url}}')

1 Answer 1


Where you are trying to get this? There is a method to get any setting form core_config_data

We get current store id (of course you can choose the on you need)

 $store_id = Mage::app()->getStore()

And then we retrieve value of setting - you have to check path of the setting if it's proper one.

Mage::getStoreConfig('web/unsecure/base_url', $store_id)

So to sum up there is a shortcut of course

$value = Mage::getStoreConfig('web/unsecure/base_url', Mage::app()->getStore())
  • Please, change Mage::getStoreConfig(''web/unsecure/base_url', $store_id) to Mage::getStoreConfig('web/unsecure/base_url', $store_id) (the odd quotation mark) Apr 7, 2016 at 12:37
  • that's right I didn't notice that, thanks! Apr 7, 2016 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.