From: Jan Svitok Date: 2006-07-30T00:54:13+09:00 Subject: Re: Webrick serving php pages? On 7/29/06, Marc Heiler wrote: > I carry many .php pages, but I mostly write in Ruby these days. > > My question is if webrick could be used to serve php pages. > > Right now I use apache, but I want to be flexible and become less > dependant on apache. (Actually, that apache sends the pages to the php > interpreter, is pretty much the only reason I use apache). It should be possible to use command line php (php.exe on win) together with WEBrick::CGIHandler: http://microjet.ath.cx/webrickguide/html/CGIHandler.html That way, you'll call your php scripts as .../cgi/php.cgi/tada.php?fsgsdfg (or similar, I haven't tried) Additionally, you can write PHPHandler < CGIHandler, that will call php for you, and add it to the FileHandler configuration (:HandlerTable, http://microjet.ath.cx/webrickguide/html/FileHandler_Configuration.html) Anyway, I expect it to be pretty slow, as php will be started each time anew. Try, and you'll see. (It'd be nice if you'd post your findings, as I haven't done this and I'm curious) HTH, Jano