Running PHP Scripts Locally

This procedure describes how to run a PHP Script from your workspace using PDT 's internal debugger.

To locally run a PHP Script:

  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 Script option to create a new run configuration.
  3. Enter a name for the new configuration.
  4. Select the required PHP executable. If no PHP Executables are listed, click the PHP Executable link and add a PHP Executable in the PHP Executable Preferences page. The PHP Executables must match the Debugger type.
  5. Under PHP File, click Browse and select your file
  6. Marking the 'Display debug information when running' checkbox will cause debug views to be displayed.
  7. If necessary, you can add arguments in the PHP Script Arguments tab to simulate command line inputs.
  8. Click Apply and then Run.

Your script 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.