php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62732 [Feature Request]Built-in TCP server
Submitted: 2012-08-03 03:32 UTC Modified: 2013-07-31 03:23 UTC
From: k at webnfo dot com Assigned:
Status: Wont fix Package: Built-in web server
PHP Version: 5.4.5 OS:
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 - 23 = ?
Subscribe to this entry?

 
 [2012-08-03 03:32 UTC] k at webnfo dot com
Description:
------------
TCP server can handle much more protocols not only on http. Like smtp, etc. Just accept the tcp message and invoke php to handle the other parts.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-05 20:11 UTC] ajf at ajf dot me
Do you mean a commandline thing like -S?

Or do you mean something like this?

  tcp_server("localhost", 9001, function ($addr, $sock) {
    // do stuff here
  });
 [2012-08-07 00:55 UTC] k at webnfo dot com
I meant commandline stuff compared to the newly added php built-in webserer.
 [2013-07-31 03:23 UTC] yohgaki@php.net
-Status: Open +Status: Wont fix
 [2013-07-31 03:23 UTC] yohgaki@php.net
How could you determine which script to be executed?
HTTP specify resource to be fetched via URL, but not for general TCP servers.

I don't see how this feature could be useful while users may specify whatever 
server PHP scripts as command line argument.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 03:01:27 2025 UTC