Re: [RfC] HTTP_Server
| From: | Yavor Shahpasov | Date: | Tue, 22 Jul 2003 09:14:49 +0000 |
| Subject: | Re: [RfC] HTTP_Server | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18521@lists.php.net to get a copy of this message | ||
Great
+1
i tried it from the php-tools site and works, I saw a small bug, sometimes
the index page did not show as html but as text instead, prob some header
not sent correctly.
I see two uses for this which interest me
a) an application server, which serves php objects something like zope
b) a SOAP/XMLRPC server, not sure how this will work, if you could make it
possible to integrate it with PEAR::SOAP somehow it would be great
Are you thinking of doing something like that in the future
Yavor
----- Original Message -----
From: "Stephan Schmidt" <schst@php-tools.net>
To: <pear-dev@lists.php.net>
Cc: <gerd@php-tools.de>; <argh@php-tools.de>
Sent: Monday, July 21, 2003 10:54 PM
Subject: [PEAR-DEV] [RfC] HTTP_Server
> Hi,
>
> I developed a small class, based on Net_Server that allows you to run
> your own webserver, fully written in PHP CLI. So there's no need for
> Apache or any other webserver. The server analyses a request, calls the
> appropriate method. The developer has to implement these methods to
> build the response for the request.
> You can do whatever you like to build the response, you just have to
> return a response code, some optional headers and the body.
> Then the server will return a valid HTTP Response to the client.
> You can take a look at a quick hack at:
> http://www.php-tools.de/PEAR/HTTP/Server.phps
>
> It's already working, but there's some work to do, before I could
> release it (implement error handling, transform reponse codes, use a
> resource as response body for larger responses).
>
>
> If you want to test it, use this script:
> <?PHP
> require_once 'HTTP/Server.php';
>
> $server = new HTTP_Server('localhost', 80);
> $server->setDebugMode('text');
> $server->start();
> ?>
> Run it in CLI mode and open "http://localhost/" with
> your browser. You
> should see some text that has been returned by the server.
>
> Just imagine a server that pulls content from shared memory or databases
> instead of a file system.
>
> I'd like to release this class as HTTP_Server, hope you agree.
>
> Stephan
>
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>