Remotely Profiling a PHP Script

This procedure describes how to profile a PHP Script from your workspace using the Zend Debugger installed on your remote server.

Note:

Your server must be running the Zend Debugger or Xdebug in order for remote debugging and profiling capabilities to function.
The Zend Debugger comes bundled with Zend Studio and Zend Server. For instructions on installing and configuring Xdebug, see Installing Xdebug and Configuring Xdebug.

 

 

Instructions on how to complete a procedure

To remotely profile a PHP script:

  1. Click the arrow next to the Profile button on the toolbar and select Open Profile Dialog -or- from the main menu go to Run | Open Profile Dialog -or- right-click in PHP Explorer view and select Open Profile Dialog.

  2. A Profile dialog will appear.

  1. Double-click the PHP Script option to create a new Profile configuration.

  2. Enter a name for the new configuration.

  1. Select the PHP Web Server option and select your server from the drop-down list.
    If you have not yet configured your server, click the underlined 'PHP Servers' shortcut. The Servers preferences page will open.
    Configure your server by following the instructions on adding a new server under the PHP Servers Preferences page.
    For more information on configuring the communication between Zend Studio and your remote server, see Setting Up Remote Debugging.

  2. Under PHP File, click Browse and select the required file.

  3. Click Apply and then Profile.

  4. A confirmation dialog will be displayed asking whether you want to open the Profiling Perspective.
    Click Yes. (If you would like the Profiling Perspective to open by default in the future, mark the 'Remember my decision' checkbox.)

The Profiling Perspective will open, displaying the Profiling Monitor window with various Profiling views.

See the PHP Profile Perspective for more on the information that will be displayed once a profile session has been run.

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.