Re: [PHP] Re: PHP from CLI with SAPI
On Mon, July 18, 2005 1:49 pm, Fredrik Tolf said: very huge undertaking. I realize that Apache is huge, but that's just because it has so insanely many features -- an HTTP server in itself shouldn't need to be very complex, the way I see it. There are innumerable other HTTP servers. Some of them support PHP (and vice versa) to varying degrees. I know there were posts about at least *ONE* of them I recall I wanted to try some day and I'm pretty sure it was because that server gave you more control over the PHP User. Now, what the name of that server was, I have NO IDEA... It was probably about 2 or 3 years ago. I vaguely recall the name was maybe somehow related to dragon ??? At any rate: The web-servers PHP supports officially is pretty short, and you should check those out. There are probably a bunch MORE web-servers that claim to work just fine with PHP -- but possibly only as CGI, at which point suexec and the faithful standard Apache is probably a better idea anyway, unless you have more reasons not yet posted for dis-liking Apache. I don't think Apache really loads *that* much stuff in if you set yourself the goal of paring down your httpd.conf to the features you NEED. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP from CLI with SAPI
Hi, Why are you displeased with apache ? After all, the 60% share market of apache must mean something :) Catalin Fredrik Tolf wrote: Hi! I've begun to be more and more displeased with Apache lately, so I've been thinking of writing my own HTTP server instead. I still want PHP support, but writing a new SAPI for PHP seems like overkill. Therefore, is it possible to use PHP from the command line, but still enable some HTTP-server-only stuff, like GET and POST variables, cookies, session management, file uploads, and so on? I haven't been able to find any docs on doing that, but I'm thinking that it should be possible. So, can someone either point me to some docs in this, or, lacking such, give me a short intro to it? Thanks for reading! Fredrik Tolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP from CLI with SAPI
Catalin Trifu wrote: Hi, Why are you displeased with apache ? After all, the 60% share market of apache must mean something :) Catalin Fredrik Tolf wrote: Hi! I've begun to be more and more displeased with Apache lately, so I've been thinking of writing my own HTTP server instead. I still want PHP support, but writing a new SAPI for PHP seems like overkill. Therefore, is it possible to use PHP from the command line, but still enable some HTTP-server-only stuff, like GET and POST variables, cookies, session management, file uploads, and so on? I haven't been able to find any docs on doing that, but I'm thinking that it should be possible. So, can someone either point me to some docs in this, or, lacking such, give me a short intro to it? Thanks for reading! Fredrik Tolf All of the features you mentioned are those provided for you by Apache, barring the session management. If you really want to write your own http server then maybe take a look at the Apache source code. It will either give you some good pointers or make you realise what a huge task you are undertaking... Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP from CLI with SAPI
On Mon, 2005-07-18 at 20:44 +0100, Mikey wrote: Catalin Trifu wrote: Fredrik Tolf wrote: I've begun to be more and more displeased with Apache lately, so I've been thinking of writing my own HTTP server instead. I still want PHP support, but writing a new SAPI for PHP seems like overkill. Therefore, is it possible to use PHP from the command line, but still enable some HTTP-server-only stuff, like GET and POST variables, cookies, session management, file uploads, and so on? I haven't been able to find any docs on doing that, but I'm thinking that it should be possible. So, can someone either point me to some docs in this, or, lacking such, give me a short intro to it? All of the features you mentioned are those provided for you by Apache, barring the session management. If you really want to write your own http server then maybe take a look at the Apache source code. It will either give you some good pointers or make you realise what a huge task you are undertaking... Are you sure about this? The way I've understood it, the web server just passes the URL to PHP, and then PHP parses and extracts the GET variables from it and construct an array of them. Likewise, surely the server just passes the content passed by the client browser, and then PHP extracts the POST variables and file uploads, right? I wouldn't think that Apache extracts POST variables and file uploads by itself. Same thing with cookies, right? Surely, the webserver just passes the headers to PHP, which extracts the cookies, right? I would think that it should be possible to pass the URL, headers, and client-passed content to PHP via PHP's CLI interface, to let it do that job. Isn't that possible? Even if not, parsing GET URLs and headers doesn't really seem like a very huge undertaking. I realize that Apache is huge, but that's just because it has so insanely many features -- an HTTP server in itself shouldn't need to be very complex, the way I see it. Thanks for responding! Fredrik Tolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php