Run configurations accommodate the most commonly used PHP development use cases. A run
configuration is a stored setting for running a PHP project. You can define several
configurations for one project and switch between them back and forth. Run configurations
apply to both running and debugging.
Note: During the project creation, the default run configuration is
defined. To define additional run configuration, customize your project setup.
To set the default run configuration for your project, choose the relevant option from the
Run As dropdown list. The following options are available:
Local Web Site. To use this run configuration, you need the
Apache http server installed and running.
Remote Web Site (FTP/SFTP). To use this configuration, you need a
hosting account on a remote server and an (S)FTP account on this server.
Script. This run configuration does not require that a web server be
installed and running. You only need a PHP engine.
Local Web Site
From the Run As dropdown list, choose Local Web Site. The further procedure depends on the
type of your project.
In the Project URL field, check the automatically generated URL address. Make sure that the
Apache HTTP server listens to the default port 80. If not, specify the port number
explicitly:
localhost:<port number>
To have a separate storage for the project's source files, select the Copy files from
Sources Folder to another location checkbox.
In the Copy to Folder field, specify the storage location.
Select the Copy files from Sources Folder to another location checkbox.
In the Copy to Folder field, specify the folder on your web server where you want to store
your source files. Use the Browse button, if necessary.
The field by default specifies the following path: <Document Root>\<New PHP
Project>.
The document root is the folder where the web server looks for files to open in the
browser. The document root is specified in the web server configuration file.
The wizard detects the and
provides the path to the default location of the htdocs folder. If you accepted
the default settings during the installation of the Apache server or the AMP package,
choose the relevant path from the dropdown list.
In the Project URL field, check the automatically generated URL address. Make sure that the
Apache HTTP server listens to the default port 80. If not, specify the port number
explicitly:
localhost:<port number>
If you are using Remote Debugging or Symbolic Links, click Advanced and set up
path mapping. See Path Mapping.
Remote Web Site
From Run As dropdown list, choose Remote Web Site (FTP/SFTP).
From the Remote Connection dropdown list, choose the relevant connection profile.
To create, update, or remove an (S)FTP Connection profile, click Manage. The Manage Remote
Connections dialog box opens with the fields showing the current (S)FTP connection profile
settings. (If there are no existing connection profiles, the Create New Connection dialog
opens automatically when you click Manage.)
To create a new (S)FTP connection profile, click Add. The Create New Connection dialog box
opens.
In the Connection Name field, enter the name of the new connection and click OK. The Manage
Remote Connections dialog box displays with the name of the new connection in the
Connection Name display field.
From the Type dropdown list, choose FTP or SFTP.
In the Host Name field, enter the (S)FTP Server name as it is written in the (S)FTP account
creation confirmation message.
In the Port field, specify 21 for an FTP and 22 for an SFTP connection.
In the User Name field, enter your FTP Username as it is written in the (S)FTP account
creation confirmation message.
Fill in the Password field.
In the Initial Directory field, enter the name of your account directory on the (S)FTP server
and click OK. You return to the Run Configuration panel.
In the Upload Directory field, enter the name of the subfolder in the initial directory
where the source files will be uploaded. The prompt below the field shows the FTP host URL.
To specify when the files will be uploaded, choose the relevant option from the Upload
Files dropdown list. The available options are: Manually, On Save, and On Run.
You also have the options to Preserve Remote File Permissions or Upload Files Directly.
If you are using Remote Debugging or Symbolic Links, click Advanced and set up
path mapping. See Path Mapping.
Script
From the Run As dropdown list, choose Script.
To specify the location of the PHP engine, click the Configure button next to the PHP
Interpreter field. The Options dialog box, tab PHP opens.
In the PHP 5 Interpreter field, specify the path to the php.exe file. Use the
Browse button, if necessary.
To specify how the script execution results will be shown, select the relevant checkbox in
the Open Result In area. The following options are available:
Output Window. The results of executing a script will appear in the output window in
the bottom of the IDE editor window.
Web Browser. The default browser window will open with the results of executing a
script in the form of an HTML file.
Editor. The results of executing a script will open as an HTML file in the IDE editor
window.
Click OK. The Options dialog box closes and the system returns to the Run Configuration
panel.
Path Mapping
If you are using Remote Debugging or Symbolic Links, you need to manually define
path mapping for individual run configurations. To define path mapping:
In the Run Configuration panel, click Advanced (not available for Script
configurations). The Advanced Web Configuration dialog opens.
Select the debug URL:
The default URL, as shown in the panel
Ask Every Time, which prompts you for the URL every time you start a debugging session
Do Not Open Browser, which starts the debug session without opening a browser window.
You need to open your web browser and browse for the URL. Note
that the GET (or POST) variable XDEBUG_SESSION_START is needed.
Click New to add a mapping. Enter the server path and the project path.
If you are using the Debugger Proxy, enter the host name and port.