4 comments

[ 0.25 ms ] story [ 6.8 ms ] thread
55–73% of nginx throughput on static files

So it is not really a competitive option for serious use.

> echo " │ Qbix Server v" . QBIX_SERVER_VERSION . str_repeat(' ', 22 - strlen(QBIX_SERVER_VERSION)) . "│\n";

Instead of this str_repeat, use str_pad [1].

I assume this is highly AI generated based on the emoji and the typical structure of README.md? At the very least have it break apart WebServer.php, this is insanely too long, and what's it with all the static stuff?

And the Revolt driver [2] is missing a composer.json with the required dependency, and the code would benefit from a use statement instead of 5 fully qualified references.

[1] https://www.php.net/manual/en/function.str-pad.php

[2] https://github.com/Qbix/webserver/blob/main/src/Q/Evented/Re...

Hopefully this can make it simpler to host live Wordpress sites locally with custom domains. Need to get a MySQL server in there. Could end up being sold as a "turn-key appliance" with management sold as an add-on. Rides on the whole local-first wave. Time to kickstart?
Quite interesting! I just happened to be searching for "a webserver written in php" today... Here's a few questions off the top of my head (happy to move them to GitHub if you prefer)

1. there are only 31 commits in the repo, no tags, no branches. How can one verify the "10 years of development and real life usage" ?

2. any plans to do a release soon?

3. why not adopt "/public" instead of "/web" as it is the most common name for the web root directory?

4. what about $_SERVER, $_ENV, $_GET, $_POST, $_COOKIES, I presume the value for those are set up by the webserver before forking and handing off execution to the user code?

5. if so, what about having a "psr" mode where a psr-compliant ServerRequest object instance is set up, and time/memory is saved by not populating the standard env vars? Also, a class would be nice that uses the `Q` functions to output a Prs Request, similar to what laminas\...\SapiEmitter does

5. support for virtualhosts: is there any at all?

6. support for listening on unix sockets: is there any at all? (eg. to create a proxy for the Docker socket)

7. hardening of the http parser: before I start digging into the code: what kind of testing was done to insure it is robust enough? Are f.e. super-long header lines tested for? Are unknown http methods rejected or let through by default? What about requests with 2 Host headers, etc...

8. Speaking of which: would this server be able to let php scripts tell apart an http request with 2 times the same header from a request with that header present a single time with a value equal to the comma-concatenation? In othre words: can it be used to implement smarter parsing of http headers than what the CGI/FCGI spec allows?

9. How does Qbix compare to previous efforts to develop a pure-php webserver, such as https://github.com/appserver-io/webserver/ ?