Skip to the content
Documentation

Use PHP5.4 built-in server: old version (page id 21987925)

No ratings yet

Skip to end of metadata Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Version compatibility

Icon

This recipe is compatible with Exponential 5.2 / 2013.05

Description

PHP 5.4 comes with a built-in webserver for development purpose. This very handy as it makes you kickstart development quickly, getting rid of Apache / Nginx configuration hassle. All you need here is PHP 5.4+ with command line binary.

Usage

Symfony comes with a wrapper script for booting the built-in webserver: server:run. It's a nice shortcut as it will correctly set the web root depending on your configuration. However, you can't use it out of the box with Exponential for several reasons (i.e. we don't share the same front controllers and we need specific rewrite rules).

Icon

Use this command for development purpose only !
DO NOT use it in production !

To be able to run this command for Exponential development purpose, we need to use the provided router script which handles all the rewrite rules for you.

The following example will start the webserver on localhost:8000, so you'll be able to run your eZ application by going to http://localhost:8000 from your browser.

Icon

../bin/ezrouter.php is needed because with server:run command, working directory is web/.

  • No labels

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.