Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Tiny PHP "standalone" server (or framework) for local debug without Apache/Nginx/Lighttpd/etc

There's manage.py runserver in Django or ruby script/server in Ruby on Rails — those familiar with one of those frameworks should already get the idea what I'm looking for. They run tiny "standalone" web server, which is perfectly enough to debug the application locally, without any need for other software (Apache/Nginx/Lighttpd/etc).

I wonder is there any PHP implementation of such tool, or, maybe, some PHP framework has such feature? Surely, I can pack pre-built pre-configured static nginx executable, but this would not be pretty, and certainly not cross-platform. Having standalone debug webserver written in PHP itself will make the package self-contained.

I.e. I'd like to type something like php tools/runserver.php, point browser to http://localhost:8000/ and see the site up and running, ready to debug.

My Google-fu has failed me, but I strongly suspect that there is such project already.

Answer*

Draft saved
Draft discarded
Cancel
6
  • 2
    Requirements: Web-Server with SCGI support (Apache, lighttpd, ...). Commented Jun 23, 2010 at 18:23
  • 1
    Thanks, but, no, it works under SCGI. What I'm looking for is just a simple and tiny HTTP server, capable of serving static files and running PHP code — nothing more. Obviously, there's no need for performance, security or any fancy features. Commented Jun 23, 2010 at 18:23
  • 1
    @drdaeman added link to nanoweb, written in PHP4.3. IIRC you need cygwin to run it under Windows - at least you used to, haven't used it in a long while Commented Jun 23, 2010 at 18:25
  • Oh I do so love people who mark down without any explanation, especially 9-months later Commented Feb 10, 2011 at 17:24
  • Ok, here goes: your answer is half answer, "half un-answer". (The Tomcat for PHP part.) Hence downvote after 2 years. Commented Jun 20, 2012 at 14:08

lang-php

AltStyle によって変換されたページ (->オリジナル) /