The recommended way to start a new Zend Framework project is to clone the skeleton
application and use
composer to install dependencies using the
Alternately, clone the repository and manually invoke
composer using the shipped
self-update directive is to ensure you have an up-to-date
Another alternative for downloading the project is to grab it via curl, and then pass it to tar:
You would then invoke
composer to install dependencies per the previous
Using Git submodules
Alternatively, you can install using native git submodules:
Web Server Setup
PHP CLI Server
The simplest way to get started if you are using PHP 5.4 or above is to start the internal PHP cli-server in the root directory:
This will start the cli-server on port 8080, and bind it to all network interfaces.
The built-in CLI server is for development only.
To use Apache, setup a virtual host to point to the
public/ directory of the
project. It should look something like below:
or, if you are using Apache 2.4 or above:
URL rewriting is a common function of HTTP servers, and allows all HTTP requests to be routed through
index.php entry point of a Zend Framework Application.
Apache comes bundled with the module``mod_rewrite`` for URL rewriting. To use it,
either be included at compile time or enabled as a Dynamic Shared Object (DSO). Please consult the
Apache documentation for your version for more information.
The Zend Framework Skeleton Application comes with a
.htaccess that includes rewrite rules to cover
most use cases:
Microsoft Internet Information Services
As of version 7.0, IIS ships with a standard rewrite engine. You may use the following configuration to create the appropriate rewrite rules.