Last active
October 4, 2015 22:48
-
-
Save davidalexander/2711848 to your computer and use it in GitHub Desktop.
Magento developer subdomains
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} | |
} |
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
This code should be added after
#Varien_Profiler::enable();
in index.php