Tokenizer: option to not clear the environment: tokenizer_clear_env=1 for scripts

Version 1.61.0


New internal directadmin.conf value: tokenizer_clear_env=1 where you can disable it with: tokenizer_clear_env=0 causing the Tokenizer not to wipe the environment before adding new values. This happens when the Tokenizer::runScript function is called, to process: |$/usr/local/bin/php <?php echo "hi"; ?> DONE| Type embedded calls.. anywhere.. (skins or templates, etc). So setting this to 0 will affect everything, just be conscious of that. ====== DEFAULT CHANGE The default, which does clear the entire env, has been changed to restore the env after being wiped out. So the env vars from before the tokenizer runs a script, will be restored after the script is done. Thus the only benefit to the feature: tokenizer_clear_env=0 is to pass any pre-script env vars to the script (aside from anything that is set/ovewritten for the script, as before, which will still be set) ====== JSON I've also added a new CMD call so you can see all current ENV vars.. if there are any or not: CMD_JSON_LANG?environment=yes Generates a JSON sub-array called "environment" holding all current "environ[]" vars from the system. You'll also get a top-level json int value: "tokenizer_clear_env": 0 if it's on (1) or not (0). Note that this is one of the first times the json output will generate an integer without "quotes". Be sure your json parser is correctly handling int values. ---- T25096

Try DirectAdmin with a 30-day money back guarantee!