Deploying Libraries

This page describes how to deploy PHP libraries.

Important!

Deploying libraries can only be performed on Zend Server 6.1 and above.

Deploy a Project as a Library

This procedure describes how to deploy a PHP project as a PHP library.

 

 

Instructions on how to complete a procedure

To deploy a project as a library:

  1. Right-click your project in the PHP Explorer, and select Configure | Add Application Deployment Support.
    If deployment support has already been added to the project, skip to the next step.
  2. Open the project's 'deployment.xml' file.
  3. In the General Information area, change the project type to 'library'.
  4. In the Testing area, click Deploy as PHP Library.
    The Deploy PHP Library dialog is displayed.

  1. Configure the deployment options:

    • Deploy to - Select the server you wish to deploy the library to, or click Add Server to add a new server. For more information on adding servers, see Adding PHP Servers.
    • Add to PHP Libraries - Select this check-box to add the created library to shared location and to PHP Libraries list.
  2. Click Finish.
    Your new PHP library is deployed to the selected server.

 

Note:

Libraries cannot be redeployed. If you wish to deploy a library that already exists, change its name or version, or remove from server.

Tip:

To use this library in a project, you will need to add in to the project's include path. For more information, see Using Libraries.

Deploying Existing Libraries

These procedures describe how to deploy libraries already existing on Zend Studio's PHP Libraries list.

Deploying from the PHP Servers View

This procedure will describe how to deploy an existing PHP library from your PHP Libraries list or a library .zpk, from the PHP Servers view.

Note:

This procedure can only be performed for Zend Server 6.1 and above servers.

 

 

Instructions on how to complete a procedure

To deploy a PHP library from the PHP Servers view:

  1. From the menu-bar, select Window | Show View | PHP Servers to open the PHP Servers view.
  2. Form the PHP Servers view, right-click the server you wish to deploy the library on, and select Deploy PHP Library.
    The Deploy PHP Library dialog is displayed.

  1. Select ZPK Package, and click Browse to locate and deploy a library .zpk file.
  2. Select PHP Library, and a library from the PHP Libraries list on the right, to deploy an existing PHP library. The list will also display libraries that are not in your open workspace. Click Manage to create a new library, or edit an existing one.
  1. Configure the deployment options:

    • Add to PHP Libraries (available if importing a .zpk file) - Select this check-box to add the created library to shared location and to PHP Libraries list.
  2. Click Finish.
    Your new PHP library is deployed to the selected server.

 

Note:

Libraries cannot be redeployed. If you wish to deploy a library that already exists, change its name or version, or remove from server.

Tip:

To use this library in a project, you will need to add in to the project's include path. For more information, see Using Libraries.

Deploying from PHP Preferences

This procedure will describe how to deploy an existing PHP library from your PHP Libraries list using the PHP Preferences dialogs.

Note:

This procedure can only be performed for Zend Server 6.1 and above servers.

 

 

Instructions on how to complete a procedure

To deploy a PHP library from PHP Preferences:

  1. From the menu-bar, select Window | Preferences | PHP | PHP Libraries.
    -OR-
    In the tool-bar, click the PHP Libraries icon .
    The PHP Libraries preferences dialog is displayed.

  1. Select the library you wish to deploy, and click Deploy to Server.
    The Deploy PHP Library dialog is displayed.

  1. Select the server you wish to deploy the library to, specify a library version (if required) and click Finish.
    Your new PHP library is deployed to the selected server.

 

Note:

Libraries cannot be redeployed. If you wish to deploy a library that already exists, change its name or version, or remove from server.

Tip:

To use this library in a project, you will need to add in to the project's include path. For more information, see Using Libraries.