Skip to content

Instantly share code, notes, and snippets.

@davidalexander
Last active Oct 4, 2015
Embed
What would you like to do?
Magento developer subdomains
/**
* Set developer mode and display_errors based on subdomain
*/
$staging_subdomains = array(
's1',
's2',
's3',
's4',
's5',
'mac',
'local',
'staging',
'dev',
'development',
'live',
);
foreach ($staging_subdomains as $needle) {
if (strpos($_SERVER['SERVER_NAME'], $needle . '.') === 0) {
Varien_Profiler::enable();
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
break;
}
}
@davidalexander

This comment has been minimized.

Copy link
Owner Author

@davidalexander davidalexander commented May 16, 2012

This code should be added after #Varien_Profiler::enable(); in index.php

@davidalexander

This comment has been minimized.

Copy link
Owner Author

@davidalexander davidalexander commented Jul 19, 2012

Code now enables Varien_Profiler::enable(); which needs to be enabled in system configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment