Forum
Is it secure to enable debug using an environmental variable?
I'm used to using environment variables with MAMP but I wanted to ask are there any security concerns when doing this with something like Perch?
e.g. I might have this in my config.php:
if ( isset( $_SERVER["DEVELOPER_ENV"]) && $_SERVER["DEVELOPER_ENV"] == 'development' ) {
define('PERCH_DEBUG', true);
}
and then I might have this in the footer:
<?php if ( isset( $_SERVER["DEVELOPER_ENV"]) && $_SERVER["DEVELOPER_ENV"] == 'development' ) {
PerchUtil::output_debug();
}?>
I appreciate this is maybe not Perch specific but I'm trying to configure my Perch install so that I get helpful information when working locally, without having to switch things on and off all the time.
That should be fine!