2

I'm a Rails developer with some Drupal 6 experience.

When I'm developing on Rails, I'm used to modifying my code and then relaunching:

cd /my/project/path
script/server

This will launch an instance of WEBrick, and my site will be available at http://localhost:3000, which is very convenient for testing - it doesn't require me to configure any Apache files and doesn't require admin rights.

In contrast now the only way I know for serving PHP pages is configuring an Apache virtualhost, which isn't as "agile".

Is there something as convenient as WEBrick, for PHP?

Kevin Worthington
  • 327
  • 2
  • 6
  • 19
egarcia
  • 175
  • 13

2 Answers2

3

A built-in webserver will be included in a future version of PHP.

sciurus
  • 12,678
  • 2
  • 31
  • 49
  • Thanks for your answer. I could not find any other server, so I'm accepting this as valid for now. – egarcia Apr 14 '11 at 08:22
2

I found it quite easy to use lighttpd in development, e.g.:

lighttpd -f lighttpd.conf
lighttpd -f ~/.lighttpd/drupal.conf
lighttpd -f ~/path-to-your-project/etc/lighttpd.conf

See also answers to similar question at stackoverflow: https://stackoverflow.com/questions/5437664/using-webrick-to-serve-php-web-applications

wik
  • 156
  • 4