Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Alexey Zakhlestin
On Thu, Feb 5, 2009 at 6:12 PM, Terry Braun t...@talking.com wrote: Hello, I've written a small web server and I'd like to add support for php to the server. Could anyone direct me to documentation or examples and give me some sense of how hard this would be. Put another way, if I have a

Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Kalle Sommer Nielsen
Hello 2009/2/5 Terry Braun t...@talking.com: Hello, I've written a small web server and I'd like to add support for php to the server. Could anyone direct me to documentation or examples and give me some sense of how hard this would be. Put another way, if I have a working PHP installation

Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Johannes Schlüter
Hi, On Thu, 2009-02-05 at 17:08 +0100, Kalle Sommer Nielsen wrote: Currently theres no SAPI documentation, however like Alexey said it would probably be easier to just the cgi/fastcgi protocol. There's a chapter in Sara's book. sapi/embed is a quite simple example of an SAPI. But I agree

Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Terry Braun
Thanks to everyone for the help. One last hopefully quick and not too naive question - can I just exec php and pipe input and output? There is probably some good reason that is not obvious to me. terry Johannes Schlüter wrote: Hi, On Thu, 2009-02-05 at 17:08 +0100, Kalle Sommer Nielsen

Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Andrew Rose
2009/2/5 Terry Braun t...@talking.com: Thanks to everyone for the help. One last hopefully quick and not too naive question - can I just exec php and pipe input and output? There is probably some good reason that is not obvious to me. terry Some reasons would be: * limited $_SERVER

Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Johannes Schlüter
On Thu, 2009-02-05 at 14:59 -0500, Terry Braun wrote: Thanks to everyone for the help. One last hopefully quick and not too naive question - can I just exec php and pipe input and output? There is probably some good reason that is not obvious to me. terry that's basically what CGI does,

Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Stanislav Malyshev
Hi! naive question - can I just exec php and pipe input and output? There is probably some good reason that is not obvious to me. The good reasons for using FCGI are: - environment passing - headers handling - POST passing - stderr handling - performance - creating new process is very

Re: [PHP-DEV] adding support for PHP to a web server

2009-02-05 Thread Stefan Marr
Hi, just a suggestion, have you thought about using Quercus [http://www.caucho.com/resin-3.0/quercus/ ] or Project Zero [http://www.projectzero.org/download/]? This projects are implementing PHP in Java. Regards Stefan On 05 Feb 2009, at 16:12, Terry Braun wrote: Hello, I've written a