exp:configphp
List, read, set and unset the define() settings of config.php, typed and checked with php -l, documented by config.php-RECOMMENDED (set and unset: dry run unless --apply).
Script bin/php/configphp.php, code in kernel/private/classes/commands/configphp.php. Run it from the installation root, as the user the web server runs as:
./console exp:configphp --help
./console exp:config:list --help
./console exp:config:get --help
./console exp:config:set --help
./console exp:config:unset --help
php bin/php/configphp.php --helpHelp text
The define() settings of config.php
./console exp:config:list [--only-set] [--format=text|json] every setting config.php-RECOMMENDED documents, with
the value config.php has, the proposed one and the description
./console exp:config:get <NAME> [--format=text|json] the value (exit 1 when it is not set)
./console exp:config:set <NAME> <value> [--type=<t>] [--apply] set it: in place, else where the documentation has it, else added
./console exp:config:unset <NAME> [--apply] comment it out again
config.php is read as PHP tokens, never run; only the value of the one define() changes, comments and
order stay. set and unset show the diff and write nothing without --apply (--dry-run is the default;
both together: exit 2). A write backs config.php up to var/backup/config/<time>/ (mode and owner
kept), checks the new file with php -l and renames it into place. A config.php that does not compile is
refused. Values of names with PASS, SECRET, KEY, TOKEN are shown as ******** unless --show-secrets.
Types (--type): bool, int, octal, float, string, null; without --type the current or the documented
value decides, true/false/null are always the PHP values. A value starting with "-": --value=<value>.Options
| Option | Value | Help |
|---|---|---|
--apply | set, unset: write config.php (the default shows the diff) | |
--dry-run | The default, kept for scripts that pass it: show the diff, change nothing | |
--type | required | set: the type of the value: bool, int, octal, float, string, null |
--value | required | set: the value (instead of the argument after the name), for one that starts with "-" |
--allow-unknown | set: add a setting config.php-RECOMMENDED does not document | |
--show-secrets | Show the values of passwords, secrets, keys and tokens | |
--format | required | list, get: text (default) or json |
--only-set | list: only the settings config.php sets | |
--root | required | The installation root (default: the installation this command belongs to) |
--file | required | The config file (default: <root>/config.php) |
--recommended | required | The documented settings (default: <root>/config.php-RECOMMENDED) |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Arguments: [verb][name][value].
Related
Generated by ./console exp:help:examples from bin/php/configphp.php, kernel/private/classes/commands/configphp.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.