PhpStorm 2017.3 Help

CLI Interpreters

File | Settings | Languages and Frameworks | PHP for Windows and Linux
PhpStorm | Preferences | Languages and Frameworks | PHP for macOS
Ctrl+Alt+S
settings


The dialog box opens when you click the Browse button browseButton  next to the CLI Interpreter drop-down list in the Development environment section of the PHP page.

Use this dialog box to configure PHP engines as interpreters, see Configuring Local PHP Interpreters and Configuring Remote PHP Interpreters. In this dialog box, you can add new interpreters and edit or remove the existing ones.

The dialog box consists of two panes. The left-hand pane lists all the configured PHP interpreters, both local and remote ones, and contains a toolbar for adding, removing, and copying PHP interpreter configurations. The contents of the right-hand pane depend on the type of the interpreter currently selected in the left-hand pane. Use the controls in this pane to edit the settings of the selected interpreter and even choose its type, if necessary.

Left-hand pane

The left-hand pane lists all the configured PHP interpreters, both local and remote ones, and contains a toolbar for adding, removing, and copying PHP interpreter configurations.

ItemTooltipDescription
newAddClick this button to add a new PHP interpreter to the list. From the drop-down list, choose the type of the interpreter (Local or Remote), and configure a local interpreter in the right-hand pane or a remote interpreter in the Configure PHP Remote Interpreter Dialog dialog that opens.
deleteDeleteClick this button to remove the selected interpreter from the list.
copyCopyClick this button to create a new interpreter with the settings copied from the selected one.

Right-hand pane

The contents of the right-hand pane depend on the type of the interpreter currently selected in the left-hand pane. Use the controls in this pane to edit the settings of the selected interpreter and even choose its type, if necessary.

Type of the selected interpreterDescription
Local
  • Name: In this text box, type the identifier to distinguish the interpreter from others, for example, php_installation_<version>.
  • PHP executable: In this text box, specify the path to the PHP engine. Type the path manually or click the Browse button browseButton.png and choose the executable file in the dialog box that opens. PhpStorm detects the version of PHP and displays it in the PHP version read-only field.

    PhpStorm also detects the debugging engine and the php.ini configuration file. The type of the debugging engine associated with the PHP interpreter and its version are displayed in the Debugger read-only field. If no debugger is detected or you have disabled it in php.ini file (see Configuring Xdebug for Using in the On-Demand Mode), the field shows Debugger: Not installed.

    The location of php.ini is displayed in the Configuration file read-only field. To edit the php.ini in PhpStorm, click Open in Editor.

  • refresh.png (Reload): Click this button to check that the specified PHP home directory actually contains a PHP executable file. If no PHP executable is detected at the specified location, PhpStorm displays the corresponding error message.
  • show_php_info.png (Show phpinfo): Click this button to have PhpStorm display a separate information window where you can examine the installation details and view the list of loaded extensions and configured options. Please note that the options specified in the Configuration Options field of the CLI Interpreters dialog box are not listed.
  • Debugger extension: in this text box, specify the location of the Xdebug extension to enable PhpStorm to activate it when necessary.

    Starting with version 2016.2, PhpStorm supports the On-Demand mode where you can disable debugger for your global PHP installation, and have it enabled automatically on demand only when you are debugging your command-line scripts or when you need code coverage reports. This lets your command line scripts (including Composer and unit tests) run much faster.

  • Configuration Options: Use this text box to customize the configuration settings of the installation by composing a string of configuration directives to be passed through the -d command line option and thus add new entries to the php.ini file. Click the Browse button browseButton to open the Configuration Options dialog box and create a list of new php.ini entries there.
Remote interpreter accessible through SSH
  • Host: in this field, type the name of the host on which the interpreter is installed.
  • Port: in this field, type the port which the SSH server on the remote host listens to. The default port number is 22.
  • User name: in the field, type the user name under which you are registered on the SSH server.
  • Auth type: from this drop-down list, choose the authentication method.
    • To access the host through a password, choose Password from the Auth type drop-down list, specify the password, and select the Save password checkbox to have PhpStorm remember it.
    • To use SSH authentication via a key pair, choose Key pair (OpenSSH or PuTTY). To apply this authentication method, you need to have your private key on the client machine and your public key on the remote server you connect to. PhpStorm supports private keys generated using the OpenSSH utility.

      Specify the path to the file where your private key is stored and type the passphrase (if any) in the corresponding text boxes. To have PhpStorm remember the passphrase, select the Save passphrase checkbox.

    • If your SSH keys are managed by a credentials helper application (for example, Pageant on Windows or ssh-agent on Mac and Linux), choose Authentication agent (ssh-agent or Pageant).
  • Name: In this text box, type the identifier to distinguish the interpreter from others, for example, php_installation_<version>.
  • PHP executable: In this text box, specify the path to the PHP engine. Type the path manually or click the Browse button browseButton.png and choose the executable file in the dialog box that opens. PhpStorm detects the version of PHP and displays it in the PHP version read-only field.

    PhpStorm also detects the debugging engine and the php.ini configuration file. The type of the debugging engine associated with the PHP interpreter and its version are displayed in the Debugger read-only field. If no debugger is detected or you have disabled it in php.ini file (see Configuring Xdebug for Using in the On-Demand Mode), the field shows Debugger: Not installed.

    The location of php.ini is displayed in the Configuration file read-only field. To edit the php.ini in PhpStorm, click Open in Editor.

  • refresh.png (Reload): Click this button to check that the specified PHP home directory actually contains a PHP executable file. If no PHP executable is detected at the specified location, PhpStorm displays the corresponding error message.
  • show_php_info.png (Show phpinfo): Click this button to have PhpStorm display a separate information window where you can examine the installation details and view the list of loaded extensions and configured options. Please note that the options specified in the Configuration Options field of the CLI Interpreters dialog box are not listed.
  • Debugger extension: in this text box, specify the location of the Xdebug extension to enable PhpStorm to activate it when necessary.

    Starting with version 2016.2, PhpStorm supports the On-Demand mode where you can disable debugger for your global PHP installation, and have it enabled automatically on demand only when you are debugging your command-line scripts or when you need code coverage reports. This lets your command line scripts (including Composer and unit tests) run much faster.

  • Configuration Options: Use this text box to customize the configuration settings of the installation by composing a string of configuration directives to be passed through the -d command line option and thus add new entries to the php.ini file. Click the Browse button browseButton to open the Configuration Options dialog box and create a list of new php.ini entries there.
Remote interpreter on a Vagrant instance
  • Name: In this text box, type the identifier to distinguish the interpreter from others, for example, php_installation_<version>.
  • PHP executable: In this text box, specify the path to the PHP engine. Type the path manually or click the Browse button browseButton.png and choose the executable file in the dialog box that opens. PhpStorm detects the version of PHP and displays it in the PHP version read-only field.

    PhpStorm also detects the debugging engine and the php.ini configuration file. The type of the debugging engine associated with the PHP interpreter and its version are displayed in the Debugger read-only field. If no debugger is detected or you have disabled it in php.ini file (see Configuring Xdebug for Using in the On-Demand Mode), the field shows Debugger: Not installed.

    The location of php.ini is displayed in the Configuration file read-only field. To edit the php.ini in PhpStorm, click Open in Editor.

  • refresh.png (Reload): Click this button to check that the specified PHP home directory actually contains a PHP executable file. If no PHP executable is detected at the specified location, PhpStorm displays the corresponding error message.
  • show_php_info.png (Show phpinfo): Click this button to have PhpStorm display a separate information window where you can examine the installation details and view the list of loaded extensions and configured options. Please note that the options specified in the Configuration Options field of the CLI Interpreters dialog box are not listed.
  • Debugger extension: in this text box, specify the location of the Xdebug extension to enable PhpStorm to activate it when necessary.

    Starting with version 2016.2, PhpStorm supports the On-Demand mode where you can disable debugger for your global PHP installation, and have it enabled automatically on demand only when you are debugging your command-line scripts or when you need code coverage reports. This lets your command line scripts (including Composer and unit tests) run much faster.

  • Configuration Options: Use this text box to customize the configuration settings of the installation by composing a string of configuration directives to be passed through the -d command line option and thus add new entries to the php.ini file. Click the Browse button browseButton to open the Configuration Options dialog box and create a list of new php.ini entries there.
Remote interpreter accessible through a deployment configuration
  • Deployment Configuration: from this drop-down list, choose the server access configuration of the SFTP type according to which you want PhpStorm to connect to the target host. If the settings specified in the chosen configuration ensure successful connection, PhpStorm displays the URL address of the target host as a link in the Deployment Host URL field.
  • Name: In this text box, type the identifier to distinguish the interpreter from others, for example, php_installation_<version>.
  • PHP executable: In this text box, specify the path to the PHP engine. Type the path manually or click the Browse button browseButton.png and choose the executable file in the dialog box that opens. PhpStorm detects the version of PHP and displays it in the PHP version read-only field.

    PhpStorm also detects the debugging engine and the php.ini configuration file. The type of the debugging engine associated with the PHP interpreter and its version are displayed in the Debugger read-only field. If no debugger is detected or you have disabled it in php.ini file (see Configuring Xdebug for Using in the On-Demand Mode), the field shows Debugger: Not installed.

    The location of php.ini is displayed in the Configuration file read-only field. To edit the php.ini in PhpStorm, click Open in Editor.

  • refresh.png (Reload): Click this button to check that the specified PHP home directory actually contains a PHP executable file. If no PHP executable is detected at the specified location, PhpStorm displays the corresponding error message.
  • show_php_info.png (Show phpinfo): Click this button to have PhpStorm display a separate information window where you can examine the installation details and view the list of loaded extensions and configured options. Please note that the options specified in the Configuration Options field of the CLI Interpreters dialog box are not listed.
  • Debugger extension: in this text box, specify the location of the Xdebug extension to enable PhpStorm to activate it when necessary.

    Starting with version 2016.2, PhpStorm supports the On-Demand mode where you can disable debugger for your global PHP installation, and have it enabled automatically on demand only when you are debugging your command-line scripts or when you need code coverage reports. This lets your command line scripts (including Composer and unit tests) run much faster.

  • Configuration Options: Use this text box to customize the configuration settings of the installation by composing a string of configuration directives to be passed through the -d command line option and thus add new entries to the php.ini file. Click the Browse button browseButton to open the Configuration Options dialog box and create a list of new php.ini entries there.

Configuration options dialog

ItemTooltip and
Shortcut
Description
NameIn this text box, type the name of the new entry.
ValueIn this text box, type the value of the new entry.
newAdd
Alt+Insert
Click this button to have a new line added to the list and specify the name and value of a new entry there.
deleteRemove
Alt+Delete
Click this button to remove the selected entry from the list.
arrowUparrowDownUp / Down
Alt+Up / Alt+Down
Use these buttons to move the selected entry up or down lin the list. The order of entries in the list determine the order in which they are passed through the -d command line option.
Last modified: 29 March 2018

See Also