You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Built in server with PHP_CLI_SERVER_WORKERS is broken in php > 8.0.2 #9400
I don't known if it's problem with chrome 104 (because firefox/vivaldi works) or with php, but is impossible to serve index.html with php 8.0.22 or php 8.1.9 and PHP_CLI_SERVER_WORKERS >2
It's impossible to serve this index.html with php >8.0.2 with PHP_CLI_SERVER_WORKERS >2
changed the title [-]PHP_CLI_SERVER_WORKERS with chrome 104[/-][+]Built in server with PHP_CLI_SERVER_WORKERS is broken in php > 8.0.2[/+]on Aug 23, 2022
I can confirm this bug.
With php 8.1.9 on ubuntu, when PHP_CLI_SERVER_WORKERS connection may hang forever (no timeout ??) and browser wait for connection to close.
In dev tool network tab, some connections are in a waiting state.
Activity
cmb69 commentedon Aug 22, 2022
What happens? Does PHP hang? Does PHP crash? Does PHP serve nonsense?
erjotek commentedon Aug 22, 2022
@cmb69
There is no crash but browser is waiting for finish request.
To finish request i need open new tab with new connection - than previous one is completed but new connection is waiting
without server workers everything works
Strace info:
I think it's important that Ctrl+C to stop server doesn't work (
[php8.1] <defunct>)erjotek commentedon Aug 23, 2022
@cmb69 I did more tests...
The problem started in 8.0.3, possibly due to fix for #80723.
PHP version 7.4.x and 8.0.0-8.0.2 are ok.
This problem is not related to chrome, it also occurs with firefox
[-]PHP_CLI_SERVER_WORKERS with chrome 104[/-][+]Built in server with PHP_CLI_SERVER_WORKERS is broken in php > 8.0.2[/+]cmb69 commentedon Aug 23, 2022
I can confirm that some requests may hang; that does apparently not happen if index.php is explicitly added to the URL.
erjotek commentedon Aug 23, 2022
@cmb69
It doesn't matter if index.php is in the url or not. It depends on the number of simultaneous connections.
This issue does not occur with a single thread PHP server (without PHP_CLI_SERVER_WORKERS)
Check it (the .jpg files don't even have to exist):
index.php:
docker-compose.yml
Erwane commentedon Sep 7, 2022
I can confirm this bug.
With php 8.1.9 on ubuntu, when
PHP_CLI_SERVER_WORKERSconnection may hang forever (no timeout ??) and browser wait for connection to close.In dev tool network tab, some connections are in a waiting state.
How to reproduce :
go to : http://localhost:8080/ in a chromium web browser (brave)
Very long time to load
Without
PHP_CLI_SERVER_WORKERS, page load is instant.Thanks.
/usr/bin/php8.1 --version/usr/bin/php8.1 -mandypost commentedon Sep 30, 2022
Used to face it few times with custom docker images, but no xdebug was enabled. Drupal using build-in server for quick-start so not easy to catch
Fix cli server blocking on accept when using multiple workers
use later php version in actions because php/php-src#9400 is fixed in…
Skip DualEraExampleTestCase on PHP 8.1
[Client] Speak the 2026-07-28 lifecycle (#456)