PhpStorm 9.0.0 Help

Servers

File | Settings | Languages and Frameworks | PHP | Servers


The page is available only when the PHP plugin is enabled. The plugin is bundled with PhpStorm and activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings dialog box as described in Enabling and Disabling Plugins.

On this page, configure HTTP access for debugging engines to interact with local and remote Web servers and set correspondence between files on the server and their local copies in the PhpStorm project. The settings from debug server configurations are used when debugging with run/debug configurations of the type PHP Web Application or PHP Remote Debug and during Zero-Configuration Debugging sessions.

Toolbar and common options

Use the toolbar buttons to manage the list of configurations.

ItemTooltip and shortcutDescription
add.png Add
Insert
Click this button to define a new configuration.
delete.png Delete
Delete
Click this button to remove the selected configuration from the list.
icon_injection_move_to_project_make_global Import Click this button to open the Import from Deployment Configuration Dialog dialog box. In this dialog box, choose a configuration to access the application on the server and use the host and port settings from it.

The dialog box also shows the path mappings retrieved from the deployment configuration. You need to transform relative paths on the server into absolute paths:

  • For an FTP, SFTP, or FTPS server access configuration, specify the absolute path to the server deployment root. This path will be added as a prefix to the path from the Root Path text box on the Deployment: Connection Tab.

    If you are not sure about this absolute path, you can open the Remote Host tool window, choose the required deployment configuration, position the cursor at the root folder, and choose Copy Path on the context menu, see Accessing Files on Web Servers for details. Alternatively, contact your hosting provider.

  • For a server access configuration of the type Local or Mounted Folder, specify the absolute path to the document root of the server or to the mounted folder. This path should be the one specified in the Folder field on the Deployment: Connection Tab.
  • For Inplace Server configurations no mappings are required because the local and remote paths are the same in this case.
See Configuring Synchronization with a Web Server for details.

Configuration details

In this area, specify the connection parameters and mappings to be used during debugging sessions. Note that the Validate Remote Environment button has been removed from this page, this functionality is now available through Run | Web Server Debug Validation on the main menu.

ItemDescription
Name In this text box, type the name of the server debug configuration.
Host In this text box, type the name of the host where the target application is deployed.
Port In this text box, type the port to connect to the specified host through. If you are using localhost on your machine, this setting should correspond with the port specified in the configuration file of the local Web server where the application will be executed or debugged.
Debugger From this drop-down list, select the debug engine to use. The available options are:
  • Xdebug
  • Zend Debugger
Use path mappings
  • Select this check box, if you are working on a remote Web server, that is, when the Web server is on a physically remote host, or the Web server is installed on your machine but your project is outside the Web server document root. Also select the check box if you are using symlinks.

    Map the absolute paths to the files and folders on the server with absolute paths to your project files in the local file system using the Path on server and File/Directory fields respectively.

    • File / Directory: This read-only field displays the files and folders of the current project. Select a file or a folder to be used as the local copy.
    • Path on server: In this filed, specify the absolute path to the file or folder on the target server to which the selected local file or folder corresponds. Type the path manually or select it from the drop-down list.

  • Clear this check box if you are working right on your Web server so your project root is under the server document root. In this case the absolute paths to the files on the Web server and the absolute paths to the corresponding files in your project are the same.

If you do not specify any path mappings and start debugging an application that is not under the server document root, PhpStorm displays an error message:

ps_debug_mappings_not_configured_error_message.png
The Click to set up path mappings link brings up the Resolve Path Mappings Problem dialog box, where you can define the path mappings:
ps_debug_mappings_not_configured_fix.png

When you click OK and leave the dialog box, PhpStorm selects the Use path mappings check box on the Servers page automatically.

Shared Select this check box to share the debug server configuration across a team. The host/port settings and the path mappings are stored in the .idea/php.xml file is available to all team members through a version control system. Note that mappings are shared only for directories inside the project.

See Also

Last modified: 13 August 2015