Configuring Local PHP Interpreters
The term local PHP interpreter denotes a PHP engine installed on your computer opposite to remote PHP interpreters that can be installed on a remote host or in a virtual environment set up in a Vagrant instance, see Configuring Remote PHP Interpreters.
Configuring a local PHP interpreter in PhpStorm
- Open the Settings / Preferences Dialog by choosing for Windows and Linux or for OS X, and click PHP under Languages&Frameworks.
- On the PHP page that opens, click the button next to the Interpreter drop-down list in the Development environment section.
- In the Interpreters dialog box that opens, click the Add toolbar button in the left-hand pane, then choose Local on the context menu. If you already have a local interpreter configured in PhpStorm, it is also shown on the menu and the menu item changes to Other Local.
In the right-hand pane of the dialog box, specify the PHP interpreter's settings.
In the Name text box, type the identifier to distinguish the interpreter from others,
Specify the PHP engine installation directory in the PHP Home field.
Type the path manually or click the Browse button and choose the location in the
Choose PHP Home dialog box, that opens.
PhpStorm displays the version of the PHP engine detected in the specified folder and the debugger associated with this PHP engine in the
- In the Name text box, type the identifier to distinguish the interpreter from others, for example,
Optionally, customize the configuration settings of the installation in the Advanced area.
In the Configuration options field, compose a string of configuration directives
to be passed through the -d command line option and thus add new entries to the
php.inifile. To do that, click the Browse button next to the Configuration options field, and then create a list of entries in the Configuration Directives dialog box, that opens.
To add a new entry, click the Add button .
In the new line, that is added to the list, specify the name of the new entry and its value in the Name and Value text boxes respectively.
You can add as many entries as you need, just keep in mind that they will be transformed into a command line with its length limited to 256 characters.
- To delete an entry, select it in the list and click the Remove button .
- To change the order of entries, use the Up and Down buttons.
- To add a new entry, click the Add button . In the new line, that is added to the list, specify the name of the new entry and its value in the Name and Value text boxes respectively.
- Click the Show phpinfo button to have PhpStorm display a separate information window where you can examine the installation details and view the list of loaded extension and configured options. Please note that the options specified in the Configuration Options field of the Interpreters dialog box are not listed.