Zend Studio Remote Server Support

Zend Studio offers the "Remote Servers" feature, which allows you to work on your project in Zend Studio normally, while synchronizing all your project files to your application container as you edit them, or if you prefer, upon request.

To set up Remote Servers support for your project with your Zend Developer Cloud application container as the remote server, follow these simple steps:

  1. Add your application container's private access key to Zend Studio
    1. In Zend Studio, go to Window → Preferences (in Linux or Windows) or Zend Studio → Preferences (in Mac OS X). The Preferences dialog will appear
    2. Enter "SSH2" into the search box and select the General → Network Connections → SSH2 pane
    3. In the "General" tab, click on the "Add Private Key" button
    4. Locate your PEM encoded private key file which you have downloaded during container creation (or the private key file paired with the public key file which you have uploaded), and select it
    5. The path to your private key file will be added to the "Private Keys" field
    6. Click "Ok" to save your changes and close the dialog
  2. Open the PHP or Zend Framework project that you want to upload to your application container, or create a new project
  3. Configure your project to use your application container as its Remote Server
    1. From the "Project" menu select "Properties". The Project Properties dialog will appear
    2. Enter "Remote Server" in the search box and select "Remote Server Support". The Remote Servers Support pane will appear
    3. Check the "Enable remote connection properties" checkbox (1)
    4. Click on the "Manage" button (2). The Remote Connection Profile management dialog will appear
    5. If you have not created a remote connection profile, the "New Remote System Connection" dialog will appear. If you already have at least one remote connection set up, click on the "Add" button in the Remote Connection Profile dialog to add a new connection
    6. Enter your container's host name (<yourcontainer>.my.phpcloud.com) and select "SSH" as the system type. When done, click "Finish"
    7. Type your container name in the Username field (1) and click "Test Connection" to verify your settings. If the connection is successful, click "Finish". The "New Remote System Connection" dialog will disappear
    8. In the Remote Server Support properties pane's "Project Directory" field (1), enter the remote directory under which the project is to be deployed. This should be one of the following directories, depending on your project layout:
      • For a traditional PHP application that is designed to be deployed entirely onto the Web server's document root, enter /<your container>/applications/<app name>/public
      • For a project that is designed to be deployed entirely outside the document root with the exception of specific files (as in the recommended Zend Framework project layout), enter /<your container>/applications/<app name>. Ensure that your project's document root directory is named 'public', and is directly under the project's root directory

      <your container>should be replaced with your container name.

    9. In the "Upload Files" drop-down menu (2), select how Zend Studio will upload files to your container:
      • To automatically upload files as they are modified and saved, select "On Save"
      • To automatically upload files as you run them or start a debug session, select "On Run"
      • To never upload files automatically, select "Manually". In this mode files are uploaded to the container only if you choose to do so
    10. Click "Ok" to save your settings, the Project Properties dialog will disappear
  4. You will be asked whether you want to upload files to the server now - click "Yes" to synchronize your project to the server.
  5. To manually synchronize your files to the server, right-click the project's root directory in the PHP Project Explorer pane, and select "Remote Servers" → "Upload To Server"
    1. The "Data Upload Selection" dialog will appear. You may choose to synchronize the entire project tree or parts of it to your server
    2. Click "Finish" to upload your files
  6. Your project is now accessible over the Web