Running PHP Web Pages

This procedure describes how to run whole applications, projects, files or collections of files that are on the server. Using this process, you can run either copies of the files which are located on the server or the files located locally on your workspace (if available).

Note:

Your server must be running the XDebug in order for remote debugging capabilities to function.

 

 

Instructions on how to complete a procedure

To run a PHP Web Page:

  1. Click the arrow next to the Run button run_icon.png on the toolbar and select Run Configurations -or- go to Run | Run Configurations.
    A Run dialog will open.

  2. Double-click the PHP Web Page option to create a new run configuration.

 run_configuration_webpage.png

  1. Enter a name for the new configuration.

  2. Select the Server Debugger to be used . PDT supports both the Zend Debugger and XDebug.

  3. Select your server from the PHP Server list.
    If you have not yet configured your server, click New.
    The PHP Server Creation Wizard will open.
    Configure your server by following the instructions on 'adding a new server' under the PHP Servers Preferences page.

  4. To check whether your server connection is correctly configured and that PDT can communicate with your server debugger, click the 'Test Debugger' button.

  5. Under PHP File, click Browse and select the file which you would like to run.

  6. The URL to be run will have been automatically created based on the file name and your server address. If the URL does not point to the file's location, unmark the Auto Generate checkbox and modify the URL.

Note:

The file to be run needs to exist on the server even if you are going to be selecting to run the local copy of your files.

  1. Click Apply and Run.

Your application will be run and displayed in a browser.

Note:

If the file contains 'include' or 'require' calls to files which are not contained within the project, you must add them to the project's Include Path in order to simulate your production environment.
In addition, if a file defined with an absolute path to a server location (See 'Include Paths' for more on absolute file locations) is called, a Path Mapping dialog will appear. See Path Mapping for more information.

 

 

link_icon.png

Related Links:

Running

Running Files and Applications

Running PHP Scripts Locally

Running PHP Scripts Remotely

Using the Debugger

Setting Up Remote Debugging