|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-09-20 14:51 UTC] requinix@php.net
[2017-09-20 20:57 UTC] mintystark at gmail dot com
[2017-09-20 21:02 UTC] requinix@php.net
[2021-06-29 13:01 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2021-06-29 13:01 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 07:00:01 2025 UTC |
Description: ------------ Currently you can't spawn multi threads with the PHP Built in Server. I know that creating such feature would take a lot of time and might require additional support from other packages, etc. However, you can spawn multiple instances of the PHP Built in Server by launching it to other Ports. So I am suggesting that all is needed is the ability for the Built in Server to auto detect an additional process and assign that process to any available ports that the built in server has access to. Ex. php -S localhost:8000-80010 -t foo/ Or (Preferably) php -S localhost:8000 -threadports 10 -t foo/ Or something like that Which would spawn 10 additional instances of the Built in server from port 8001 to 8010. Then if I am running a process on 8000 and make an addition process request on port 8000. it will pass the process to the next available port 8001. Like if I do a curl request to port 8000 or need any additional process requests like using exec() or shell_exec() etc. Currently running those commands with the built in web server on an existing process halts the request until the command finishes. Even if you add the "&" at the end of the command which should return the request immediately. Example: shell_exec('php -f "class.php" > /dev/null 2>&1 & echo $!); Thanks