I need to programmatically set a config based on the Magento instances' base_url. I cannot seem to access the base_url from my install/setup script:
$installer = $this;
$installer->startSetup();
var_dump(Mage::getStoreConfig('web/unsecure/base_url'));
var_dump(Mage::getBaseUrl());
var_dump(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
die();
This prints out:
null
string 'index.php/' (length=10)
string '/' (length=1)
I think it is possible that the configs are not initialised at this point and perhaps I need to initialise it. Or it seems more likely that Magento does not know which store the script is referring to. What are your suggestions?