mpyw / php-hyper-builtin-server

Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption
MIT License
106 stars 10 forks source link

Unable to start hyper-run #19

Open seebz opened 4 years ago

seebz commented 4 years ago

Since I upgraded PHP to version 7.4, I'm unable to start hyper-run.

Built-in PHP server works :

$ php -S localhost:8000 -t www
[Thu Sep 24 09:44:08 2020] PHP 7.4.10 Development Server (http://localhost:8000) started

Quick start example from README :

$ hyper-run -S localhost -s localhost -t www
Error: Duplicated entry: localhost

Custom ports example from README :

$ hyper-run -S localhost:8080 -s localhost:4000 -t www
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:52539) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54133) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:58997) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54851) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:65284) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:60798) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:65413) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:63804) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:55732) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53979) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:62822) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:64312) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54734) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:60045) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:61284) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:56131) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:59626) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:62500) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:58479) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:55313) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:63849) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54446) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:59942) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:55327) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:59561) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:63357) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54137) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53481) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54744) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:52055) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:59919) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:62931) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53021) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:60657) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:60028) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:59783) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:49389) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:59613) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:61402) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53796) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:56580) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:62519) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:55581) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:55662) started
[Thu Sep 24 09:48:48 2020] PHP 7.4.10 Development Server (http://127.0.0.1:56141) started
Error: Failed to launch server.

I'm using the version 3.1.0 globally :

$ composer global show mpyw/php-hyper-builtin-server
Changed current directory to /home/sebastien/.config/composer
name     : mpyw/php-hyper-builtin-server
descrip. : Reverse proxy for PHP built-in server which supports multiprocessing and TLS/SSL encryption
keywords : Built-in, builtin, multiprocess, multiprocessing, proxy, reverse, server, ssl, tls
versions : * v3.1.0
type     : project
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/mpyw/php-hyper-builtin-server.git 14a24b679b6a1b6af4c21fa05288939bc71bd87e
dist     : [zip] https://api.github.com/repos/mpyw/php-hyper-builtin-server/zipball/14a24b679b6a1b6af4c21fa05288939bc71bd87e 14a24b679b6a1b6af4c21fa05288939bc71bd87e
path     : /home/sebastien/.config/composer/vendor/mpyw/php-hyper-builtin-server
names    : mpyw/php-hyper-builtin-server

autoload
psr-4
mpyw\HyperBuiltinServer\ => src/
React\Socket\ => socket/src/

requires
lib-openssl *
php >=5.4.0
react/child-process ^0.4.1
react/promise ^2.4

requires (dev)
codeception/aspect-mock ^2.0
codeception/codeception ^2.2
codeception/specify ^0.4.6
mpyw/co ^1.5
mpyw/privator ^2.0
php >=7.0.0
satooshi/php-coveralls ^1.0

My setup :

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:    18.04
Codename:   bionic

$ apt list php* --installed
Listing... Done
php-cli/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-common/bionic,bionic,now 2:76+ubuntu18.04.1+deb.sury.org+9 all [installed,automatic]
php-composer-ca-bundle/bionic,bionic,now 1.1.0-1 all [installed,automatic]
php-composer-semver/bionic,bionic,now 1.4.2-1 all [installed,automatic]
php-composer-spdx-licenses/bionic,bionic,now 1.3.0-1 all [installed,automatic]
php-composer-xdebug-handler/now 1.3.2-1 all [installed,local]
php-curl/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-gd/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-intl/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-json-schema/bionic,bionic,now 5.2.6-1 all [installed,automatic]
php-mbstring/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-mysql/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-psr-log/bionic,bionic,now 1.0.2-1 all [installed,automatic]
php-sqlite3/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-symfony-console/bionic-updates,bionic-updates,bionic-security,bionic-security,now 3.4.6+dfsg-1ubuntu0.1 all [installed,automatic]
php-symfony-debug/bionic-updates,bionic-updates,bionic-security,bionic-security,now 3.4.6+dfsg-1ubuntu0.1 all [installed,automatic]
php-symfony-filesystem/bionic-updates,bionic-updates,bionic-security,bionic-security,now 3.4.6+dfsg-1ubuntu0.1 all [installed,automatic]
php-symfony-finder/bionic-updates,bionic-updates,bionic-security,bionic-security,now 3.4.6+dfsg-1ubuntu0.1 all [installed,automatic]
php-symfony-polyfill-mbstring/bionic,bionic,now 1.6.0-2 all [installed,automatic]
php-symfony-process/bionic-updates,bionic-updates,bionic-security,bionic-security,now 3.4.6+dfsg-1ubuntu0.1 all [installed,automatic]
php-xdebug/bionic,now 2.9.6+2.8.1+2.5.5-3+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php-xml/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php-zip/bionic,bionic,now 2:7.4+76+ubuntu18.04.1+deb.sury.org+9 all [installed]
php7.4-cli/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-common/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-curl/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-gd/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-intl/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-json/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-mbstring/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-mysql/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-opcache/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-readline/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-sqlite3/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]
php7.4-xml/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-zip/bionic,now 7.4.10-1+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic]

Please help

antonkomarev commented 4 years ago

@mpyw could you look on it? I'm away from my PC for a couple of days

seebz commented 4 years ago

Also noticed than processes are not killed.

Commands in order

$ ps aux | grep php
sebasti+  4987  0.0  0.0  15660  1084 pts/0    S+   11:09   0:00 grep --color=auto php
$ hyper-run -S localhost:8080 -s localhost:4000 -t www
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:50165) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53463) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:62224) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:64552) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:52674) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:62683) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:49612) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54413) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:55533) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:56968) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:54788) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:49385) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53677) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53475) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:53015) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:52472) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:52618) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:57513) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:56259) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:65373) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:56920) started
[Thu Sep 24 11:13:15 2020] PHP 7.4.10 Development Server (http://127.0.0.1:56065) started
Error: Failed to launch server.
$ ps aux | grep php
sebasti+  5151  0.0  0.0   4628   820 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:62683' -t 'www'
sebasti+  5152  1.0  0.1 452928 29188 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:62683 -t www
sebasti+  5153  0.0  0.0   4628   812 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:52674' -t 'www'
sebasti+  5154  0.0  0.0   4628   800 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:53463' -t 'www'
sebasti+  5155  1.3  0.1 452928 29312 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:52674 -t www
sebasti+  5157  1.3  0.1 452928 29184 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:53463 -t www
sebasti+  5159  1.0  0.1 452928 29068 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:62224 -t www
sebasti+  5161  1.0  0.1 452928 29220 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:50165 -t www
sebasti+  5162  0.0  0.0   4628   812 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:49612' -t 'www'
sebasti+  5163  1.0  0.1 452928 29000 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:64552 -t www
sebasti+  5164  0.0  0.0   4628   808 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:56968' -t 'www'
sebasti+  5165  0.0  0.0   4628   860 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:55533' -t 'www'
sebasti+  5166  0.0  0.0   4628   876 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:54413' -t 'www'
sebasti+  5167  1.3  0.1 452928 29140 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:49612 -t www
sebasti+  5168  1.3  0.1 452928 29100 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:54413 -t www
sebasti+  5169  1.3  0.1 452928 29272 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:55533 -t www
sebasti+  5170  1.3  0.1 452928 29220 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:56968 -t www
sebasti+  5174  0.6  0.1 452928 29332 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:54788 -t www
sebasti+  5175  1.0  0.1 452928 29140 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:49385 -t www
sebasti+  5176  1.0  0.1 452928 29200 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:53677 -t www
sebasti+  5178  0.6  0.1 452928 29216 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:53475 -t www
sebasti+  5180  0.6  0.1 452928 29012 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:53015 -t www
sebasti+  5182  0.6  0.1 452928 29156 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:52472 -t www
sebasti+  5184  0.6  0.1 452928 29200 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:52618 -t www
sebasti+  5186  0.6  0.1 452928 29212 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:57513 -t www
sebasti+  5188  0.6  0.1 452928 29308 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:56259 -t www
sebasti+  5191  0.6  0.1 452928 29308 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:65373 -t www
sebasti+  5192  0.6  0.1 452928 29100 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:56920 -t www
sebasti+  5194  1.0  0.1 452928 29124 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:56065 -t www
sebasti+  5196  0.6  0.1 452928 29204 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:63302 -t www
sebasti+  5197  0.0  0.0   4628   820 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:56805' -t 'www'
sebasti+  5198  0.6  0.1 452928 29144 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:56805 -t www
sebasti+  5199  0.0  0.0   4628   800 pts/2    S    11:13   0:00 sh -c '/usr/bin/php7.4' -S '127.0.0.1:58160' -t 'www'
sebasti+  5200  1.0  0.1 452928 29060 pts/2    S    11:13   0:00 /usr/bin/php7.4 -S 127.0.0.1:58160 -t www
sebasti+  5202  0.0  0.0  15660   968 pts/2    S+   11:13   0:00 grep --color=auto php
xenogenesi commented 3 years ago

Any progress? I'm having the same issue (php7.4)

apocello2008 commented 3 years ago

same issue php7.4

wvffle commented 3 years ago

And php 8.0.2 is affected as well

mpyw commented 3 years ago

Sorry, I don't have enough time for maintain this project. But I'll review any PRs if you submit the fixes and mention me.