Howdy everyone,
I’m reaching out in an attempt to start an RFC for the apach2handler module, and I’m eager to hear your perspectives. I’ve already created a Draft PR on GitHub (https://github.com/php/php-src/pull/14047), and I am ready to move forward with the next steps of the proposal (RFC karma/wiki). The current Apache2handler issue is the inability to get user input during an HTTP 101 Upgrade request. Current PHP standards require binding to a port and serving all connections in a PHP CLI server. In my brief draft, I explain how current io streams function and how this solution differs. My change could be a game-changer for shared hosting environments. But what’s even more exciting is its unexplored potential for normal requests. This could open up a whole new world of possibilities. I’m open to further discussion and collaboration to ensure its success and get passing tests 
The function would expose the HTTPD function ap_get_conn_socket
; below are the generalized calls.
apr_sock = ap_get_conn_socket(r->connection);
stream = php_stream_sock_open_from_socket(fd, NULL);
apr_os_sock_get(&fd, apr_sock)
php_stream_to_zval(stream, return_value);
Please refer to the PR for the real implementation
Thanks for your time!
PHP Wiki user: WookieeTyler
Best,
Richard Miles
Miles Systems LLC
Richard@Miles.Systems
(817) 789-3294
![emailImg.png]()
Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
(Attachment emailImg.png is missing)
On Fri, Apr 26, 2024 at 6:43 AM Richard Miles <richard@miles.systems> wrote:
Howdy everyone,
I’m reaching out in an attempt to start an RFC for the apach2handler module, and I'm eager to hear your perspectives. I’ve already created a Draft PR on GitHub (RFC - Added the apache_connection_stream() function for CGI WebSockets by RichardTMiles · Pull Request #14047 · php/php-src · GitHub), and I am ready to move forward with the next steps of the proposal (RFC karma/wiki). The current Apache2handler issue is the inability to get user input during an HTTP 101 Upgrade request. Current PHP standards require binding to a port and serving all connections in a PHP CLI server. In my brief draft, I explain how current io streams function and how this solution differs. My change could be a game-changer for shared hosting environments. But what's even more exciting is its unexplored potential for normal requests. This could open up a whole new world of possibilities. I'm open to further discussion and collaboration to ensure its success and get passing tests 
The function would expose the HTTPD function `ap_get_conn_socket`; below are the generalized calls.
apr_sock = ap_get_conn_socket(r->connection);
stream = php_stream_sock_open_from_socket(fd, NULL);
apr_os_sock_get(&fd, apr_sock)
php_stream_to_zval(stream, return_value);
Please refer to the PR for the real implementation
Thanks for your time!
PHP Wiki user: WookieeTyler
Best,
Richard Miles
Miles Systems LLC
Richard@Miles.Systems
(817) 789-3294
Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
Heh, that's pretty cool that html emails work here, but do note that
it's against the rules (I didn't make the rules, I'm just letting you
know). PHP: Mailing Lists
Robert Landers
Software Engineer
Utrecht NL