Using Yii with PHP 5.4 built-in webserver instead of Apache

Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it:

  1. Open command line and cd to webroot (where your index.php is).
  2. Run PHP as webserver:
path/to/php -S localhost:8080
  1. That's it. Now you can work with your Yii project using http://localhost:8080/.

You don't need any rewrite rules. Both clean URLs and path-style URLs are working just fine.

21 0
6 followers
Viewed: 15 241 times
Version: 1.1
Category: How-tos
Written by: samdark
Last updated by: samdark
Created on: Mar 5, 2012
Last updated: 6 years ago
Update Article

Revisions

View all history

Related Articles