Get or set PHP config directive for the currently active PHP version
box php:ini [-l|--list-files] [--] [<key>] [<value>]
To retrieve a value from the currently installed PHP version, you can use the
box php:ini <directive> command. For example, to get the current
box php:ini mysql.default_socket
To change this value into something else, append the new value:
box php:ini mysql.default_socket /path/to/new/socket
The script puts these directives into an additional config file that overrides the default values. To remove the directive again, pass in an empty value:
box php:ini mysql.default_socket ""
If you want to get the list of the scanned .ini files, run the command without arguments:
Name of the directive to lookup or update
--list-files , -l
List all installed PHP versions
To get a list of the PHP versions you have build and installed, run:
box php:use <VERSION> command to switch to one of the available versions.
Uninstall a custom PHP version
box php:remove <version>
PHP version to remove
Switch back to the default system PHP
Switch to another PHP version. Will attempt to compile from source if not installed.
box php:use <version>
You can build and install any PHP version from 5.2.0 and up automatically. This is ideal to try out your code on new PHP releases or to fix bugs that have been reported on older PHP versions.
To install one of the available versions, for example 7.0.0RC6, execute:
box php:use 7.0.0RC6
The script will check if this version has been installed and if not, will attempt to build it. Please note that building PHP might take a while.
You can get a list of buildable versions using the
box php:versions command. To see what is already compiled and available, use the
box php:list command.
To revert back to the default PHP installation, run
The truly adventurous can build the current master branch with this command:
box php:use master.
Each time you build the master branch the script will pull in the latest changes from the PHP Git repository.
PHP version to remove
List all available versions
To get a list of the PHP versions you can build and install, run this command:
box php:use <VERSION> command to build and install one of the available versions.
Let our developers personally assist you. You can ask development related questions in our Support Center. Only for Business or Agency subscribers.