banner



How To Install Zend Server On Windows

Zend server

Zend Server seamlessly integrates with PhpStorm, providing advanced features for debugging and profiling your spider web applications.

Zend Server is an integrated platform for mobile and spider web apps, helping in all phases of the application lifecycle. Zend Server includes Z-Ray, which gives unprecedented, in-context visibility inside apps, by showing in real time what exactly happens to construct each page. It helps developers write amend code, detect and fix issues earlier, and collaborate with the operations staff to resolve production bug faster.

In this tutorial we'll await into how to configure integration and go on with debugging, profiling, or deploying your code, as well as using many built-in tools with PhpStorm, while Zend Server takes intendance of your PHP surroundings.

The following video will walk you through getting started with Zend Server:

To learn more than near Zend Server configuration and usage, refer to the Zend Server Documentation.

Getting started

At that place are 2 main ways to install Zend Server: locally, by downloading the application from the Zend's web site, or by running it in the cloud (for example, in a special Amazon Web Services instance).

Installing Zend Server locally (or on a remote server)

Register for a Zend account and download the Zend Server application for your operating system from the Zend's spider web site. Several versions are available differing by the PHP interpreter version.

Follow the steps of the installation magician and complete the installation.

Using Zend Server in the cloud (AWS)

Different editions of Zend Server are likewise available in the AWS marketplace. With Zend Server running at Amazon Web Services, you can run loftier-performance, rubberband, and dependable PHP-based Spider web & Mobile apps in the deject.

Zend Server software offers a thirty-24-hour interval trial for , but AWS charges for the instance exercise use. If you've never used AWS before, y'all may qualify for a full yr of EC2 usage at no charge through the AWS Complimentary Tier programme (new cloud users only).

Zend AWS overview

Yous will exist offered to select the parameters of the instance (such as configuration of the VM, region, security settings) and generate a new key pair to access the case. Review all settings and keep with AWS instance configuration.

After the process is completed, go to the AWS panel to manage the newly created instance with Zend Server installed.

Zend AWS running

For more details, watch the video tutorial on Getting Started with Zend Server on AWS or cheque out the installation guide

Launching Zend Server

As soon every bit your Zend Server is installed and running, open up it post-obit the http://localhost:10081/ZendServer or https://localhost:10082/ZendServer links (replace localhost with the hostname you're using. If you lot are using an AWS instance, the address will be similar to http://ec2-54-195-230-127.eu-west-1.compute.amazonaws.com:10081/).

On the next footstep, you volition be offered to read and have the License Understanding, and configure some initial parameters:

  • Profile (Development / Production - Single Server / Production - Create or Join a Cluster) - Development profile suits most development environments

  • Cluster Configurations (in case you selected Cluster on the previous stride)

  • Passwords

  • Standard library packages to deploy

After the configuration is completed and you have successfully logged in, the Zend Server Guide Page is displayed:

Zend start page

For educational purposes, we'll deploy a demo awarding from the Zend Server Guide Page. To learn how to set up and deploy your own applications to Zend Server, refer to the Deployment to Zend Server with a ZPK package section. A demo application is a Zend Framework 2 skeleton application which includes customized monitoring and caching rules, events, recurring jobs, and statistical data.

We'll be using a local version of Zend Server below, merely all the deportment and workflows apply to remote AWS or standalone installation also (additional configuration notes are provided where applicable).

Deploy a Demo application

  1. Click the Sample App button on the Zend Server Guide Folio.

    Download Zend demo app
  2. Enter the application proper name, path, and virtual host.

    Enter Zend demo app details
  3. Check that the application prerequisites are validated.

    Zend demo app validation
  4. Review the deployment summary and click Deploy to proceed with deployment.

    Zend demo app: review summary

    After the deployment process is finished, you volition be brought to Zend Server's applications list:

    Zend apps list

    Here you lot tin can hands check information about the deployed application, bank check the condition, continue to monitoring, and perform other actions.

We recommend y'all to familiarize yourself with Zend Server before proceeding to the adjacent footstep. The Zend Server Getting Started Guide provides a good starting signal.

Debugging with Z-Ray & PhpStorm

Z-Ray is a browser tool window that displays all the under-the-hood details of a page request, across all the PHP scripts involved in building the page. Z-Ray is injected into the response coming from your PHP app and shown right in the browser you're using for evolution, so you go much greater insight without changing your development workflow.

Zray Overview

SSH tunnel configuration for remote debugging

If you are using AWS or any other standalone remote installation of Zend Server, some configuration is needed to prevent your firewall from blocking debugger communications.

To get a remote session running, ready upward an SSH tunnel for the debug port (10137 by default). If you are running Linux or macOS, run the following control from your local last where PhpStorm is running:

ssh -R 10137:localhost:10137 remote-host.compute.amazonaws.com -i ZS.pem -l ubuntu

If you are running Windows, do the following:

  • Download PuTTY

  • Catechumen the PEM file to a PPK file by running puttygen.exe, loading the PEM file, and saving the private key to the PuTTY's key format

  • Run the following command to set up the tunnel:

putty -R 10137:localhost:10137 remote-host.compute.amazonaws.com -i ZS.ppk -l ubuntu

where: 10137 is the debugging port (can be changed in PhpStorm and Zend Server, see Additional Configuration section) remote-host.compute.amazonaws.com is the remote hostname where your Zend Server is installed ZS.pem is an authorization key (certificate generated by AWS or other authority, see this commodity for details) ubuntu is a username on remote host Depending on your local privileges, you may need to execute the terminal command from a super user (with sudo.

The SSH tunnel should be established every fourth dimension earlier you initiate a debugging/profiling session. It is non needed in the following situations:

  • If Zend Server and PhpStorm are running on the same machine.

  • If there is a direct link betwixt Zend Server & PhpStorm and no firewall is configured.

Debug your Zend application

  1. In PhpStorm, enable listening to incoming debug connections by either clicking the Start Listening for PHP Debug Connections button on the toolbar or selecting in the main menu. This will ensure PhpStorm reacts when a debugging session is started and opens the Debug tool window automatically. Earlier launching the script, make sure that either a breakpoint is prepare or the Break at beginning line in PHP scripts option is enabled on the Debug page of the Settings/Preferences dialog Ctrl+Alt+S.

  2. Set a breakpoint in your code by clicking in the editor gutter near the line you would like to interruption at.

  3. Open up your application running on the Zend Server with the Z-Ray bar enabled, click the Debug icon the Debug icon and select Debug Current Page.

    Debug Current Page
  4. Take the incoming connection from Zend Debugger in PhpStorm.

    Accept incoming connection

    PhpStorm will break at the breakpoint (or outset line if that selection is enabled), providing you with the workflow for debugging your application in the IDE.

    Zend debugger breakpoint

Profiling with Z-Ray and PhpStorm

All the notes and additional configuration for remote debugging utilise here every bit well.

Profile your Zend application

  1. In PhpStorm, enable listening to incoming debug connections by either clicking the Start Listening for PHP Debug Connections button on the toolbar or selecting in the main card. This volition ensure PhpStorm reacts when a debugging session is started and opens the Debug tool window automatically. Before launching the script, make sure that either a breakpoint is set or the Break at first line in PHP scripts option is enabled on the Debug folio of the Settings/Preferences dialog Ctrl+Alt+S.

  2. Open your application running on the Zend Server with the Z-Ray bar enabled, click the Debug icon the Debug icon and select Profile Current Page.

    Profile Current Page

    An application contour snapshot will open in PhpStorm.

Make certain to select the Server in order to take advantage of context card actions, such as Jump To Source, Quick Definition, Quick Documentation (more information about server configuration is bachelor in the Additional Configuration section). You may need to set mappings for your project in Settings / Preferences | PHP | Servers. You need to utilize path mappings when the paths to the files processed by the server differ from the paths to the files in the project. A path mapping specified for a parent directory is automatically practical to all its subdirectories. If necessary, y'all can specify path mappings for any subdirectory or fifty-fifty an individual file separately.

Debugging and profiling with Zend Server and PhpStorm from Events List / Unmarried Event

Zend Server is tracking everything that's going on with your application. To hands run across all the issues, utilise the monitoring events list available at .

A debugging / profiling session can be initiated from the listing of events with relevant actions (Debug in IDE, Profile in IDE, or Show in IDE). Before initiating a debugging / profiling session from the Zend Server side, make sure that the IDE is listening for debug connections (see Debugging with Z-Ray and Profiling with Z-Ray for details).

Zend events list actions

Deployment to Zend Server with a ZPK package

There is no GUI for Zend Server deployment in PhpStorm, simply it even so lets you prepare ZPK deployment packages. This tin be washed either past using a last or via the Control Line Tools integration.

We'll focus on the 2nd selection, as it conveniently provides completion options for command line tool commands and parameters.

Later on preparing the ZPK package, we'll deploy information technology to the Zend Server.

Create a command line tool for Zend Server deployment tool

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), get to .

  2. Click the Add button, select Custom tool from the list, and set the tool visibility (projection or global).

    Creating a custom Zend tool
  3. Set the path to the tool (/usr/local/zend/bin/zdpack in our case; for OS-specific paths, refer to the Zend Server documentation) and alias.

    Custom Zend tool settings
  4. Utilize changes and click the Edit Source button to open up the tool definition in the editor.

  5. Find the link to Zend Server's deployment tool (zdpack) repository in the custom command line definitions directory and copy the unabridged XML from the repository to the opened editor tab.

    Custom Zend tool definition

You can at present launch the zdpack command line tool by either selecting in the main menu or pressing Ctrl+Shift+X.

Fix a deployment packet in PhpStorm

  1. Select a directory and use the create command to prepare the skeleton of your ZPK package. This includes the XML descriptor file, the data folder and the claw scripts:

    zdpack create application-name

  2. Verify that the resources take been created in the specified directory:

    • Data folder - The folder that will incorporate your awarding files.

    • Scripts folder - The claw script skeletons available for y'all to edit equally needed, and existing monitoring and caching rules.

    • deployment.xml file - The template of the XML descriptor for you to edit as needed.

  3. Perform the following actions:

    • Identify your awarding files in the information folder. Edit the hook scripts co-ordinate to your needs.

    • Edit the deployment.xml every bit needed. The XML template is comprised upwardly of example elements. The required elements are name, version, and appdir.

    • Validate the package by using the validate command

    zdpack validate package-xml-descriptor-file

  4. Use the pack command to pack the contents into a ZPK package. By default, the Deployment Tool will create the package in the working directory.

    zdpack pack application-name

    In our case, to prepare the test application for deployment, we need to run the following commands:

    zdpack create drupal8a zdpack validate drupal8a/deployment.xml zdpack pack drupal8a

    As a result, drupal8a.zpk has been generated in the root folder of our projection.

Deploy a package to Zend Server

  1. Open and click Deploy Application.

  2. Choose the ZPK package from the file arrangement and follow the deployment steps. Accept the license understanding, validate prerequisites, and provide the required parameters.

Working with databases on Zend Server with PhpStorm

Zend Server integrates with various databases (MySQL by default), which can be very handy for development purposes. PhpStorm comes with Database & SQL back up. Make sure to connect the IDE to the evolution instance of Zend Server to accept advantage of these tools.

Additional configuration (optional)

Configuring integration with Zend Server

You can configure the Zend Server IDE integration parameters under , though this is normally optional. For instance, the debug port tin be inverse here by triggering the Autodetect IDE settings option:

Additional IDE settings

Notation that debug port must be the prepare to the same value equally in PhpStorm. If needed, the Debug port and the Settings broadcasting port tin exist changed in PhpStorm on the page of the Settings /Preferences dialog Ctrl+Alt+Due south.

PhpStorm debugger settings

If you feel problems with the Z-Ray system requests invoking the debugger multiple times in PhpStorm, brand sure that the Ignore Z-Ray system requests checkbox is selected on the folio of the Settings/Preferences dialog Ctrl+Alt+S.

Setting Zend Server as a Server in PhpStorm

As soon as a debugging or profiling session is established between Zend Server and PhpStorm, Zend Server will be added as a PHP server in PhpStorm configuration. If necessary, you can change its settings folio of the Settings/Preferences dialog Ctrl+Alt+S.

Servers settings

This server tin be used at al subsequently point to configure Run Configurations.

Configuring PHP interpreter in PhpStorm

Using a PHP interpreter bundled with Zend Server provides the advantages of a PHP interpreter installed in a production-like surround. This way, we can make certain at that place will exist no inconsistencies when the application is deployed to production.

Yous can apply a PHP interpreter, for example, to test with PHPUnit or Behat, or analyze your code past using PHP code quality tools.

The interpreter tin exist set up on the page of the Settings/Preferences dialog (Ctrl+Alt+S). See Configure local PHP interpreters for details.

Using the ZF Tool command line tool from PhpStorm

Configure zftool equally a control line tool

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), get to .

  2. Click the Add button on the toolbar.

  3. In the Command Line Tools dialog, choose Zend Framework ane Tool or Zend Framework ii Tool from the listing, and specify its visibility level (Project or Global).

    the Command Line Tools dialog
  4. When you click OK, the Zend Framework Tool dialog opens.

    Provide the path to ZF Tool depending on the Zend Framework version used and choose one of the configured PHP interpreters from the PHP Interpreter list. See Configure local PHP interpreters and Configure remote PHP interpreters for details.

    • <Zend-Framework-home>/zf for Zend Framework 1.

    • <Zend-Framework-dwelling house>/zf.php or <Zend-Framework-home>/zftool.phar for Zend Framework 2.

  5. Click OK to utilize changes and return to the Command Line Tool Support page. Optionally, click the Edit button to edit the tool properties, or the Edit Source button to customize the commands set. Come across Customize a tool for details.

Run zftool commands

  • From the principal menu, choose or press Ctrl twice.

    In the Run Anything window that opens, type the call of the control in the <zf> <command> or <zf2> <command> format.

    The command execution consequence is displayed in the Run tool window.

    Running a zftool command

Stop a command

  • Click the Stop button on the Run tool window toolbar.

Final modified: 17 March 2022

Source: https://www.jetbrains.com/help/phpstorm/using-product-with-zend-server.html

Posted by: ottopairofterl.blogspot.com

0 Response to "How To Install Zend Server On Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel