Deploying Code with Zend Server

This procedure describes how to deploy your PHP code to run with Zend Server.
Zend Server provides all the components for creating an environment suitable for developing and deploying PHP applications.
In order for a PHP Application to run you need a Web server. Apache is bundled by default with Zend Server and is used to run your PHP code. This option may vary depending on your operating system, for instance, MS Windows also supports an existing IIS installation so you can choose either Apache or IIS and in Mac, Zend Server uses the distribution's Apache.

 

The process of writing PHP applications is separated into two distinct sections: Development and Production.

Development

Where to Put the Code?

In order to run a PHP application, your PHP files must be placed in a specific location that indicates to the Web server what files to service.

When you are ready to run your PHP code on a Web server, place the files under the following directory according to your operating system and preferences:

Windows:   

Mac and Tarball:

DEB:

RPM:

Running the Code/Application

Open a browser and enter the URL: http://localhost: /<yourPHPfile>.php
Replace <port number> with the port you are using. The defaults are port: 80 (for Windows) and port: 10088 (for the other operating systems), unless you changed the port by preference.

Replace <yourPHPfile>.php with name of the file you want to access/run.

Note:

Remember to use the port name according to the port number you defined.

bulb.gifTo find out how to locally debug your code once it's deployed in a Web server, see Working with Local Debugging.

Production

Deploying code to production is different than running your application in a controlled environment (such as a local server). Production means publishing your application to the internet.

 

So where do you publish your application?

Depending on the resources available to you, you either have a different server that is dedicated to servicing the web or a cluster of servers that are managed with a load balancer. In both cases, a firewall or some other protection is necessary.

An additional option is to have your application run from a Web Hosting company.

 

Once your code is in its dedicated location, you will have to support the code so you will need to establish a way to upload files for purposes of issuing updates and fixing bugs or security threats. At this point if you have been locally debugging your code with Zend Studio you can now change your settings to remote debugging, if there is a firewall between you and your application's files you will need to use tunneling in order to debug through a firewall. Zend Studio users can also benefit from Remote Server support for uploading and synchronize your code.

 

 

Related Links

Related Links:

Working with Local Debugging 
Zend Studio documentation (External Link)

Installation Guide

Working with Firewall Tunneling

Windows: IIS URL Rewrite Setup