Edit report at https://bugs.php.net/bug.php?id=80931&edit=1
ID: 80931
Comment by: arjan at avoid dot org
Reported by: gilperon at gmail dot com
Summary: file_get_contents() hangs with HTTP/1.1 if server
doesn't close connection
Status: Verified
Type: Bug
Package: Streams related
Operating System: any
PHP Version: 7.4
Block user comment: N
Private report: N
New Comment:
Seems this (or a very similar) issue is back in PHP8.1.12 and 8.1.13.
Super simple test case:
<?php
print
file_get_contents('https'.'://'.'www'.'nrc'.'nl');
?>
It seems impossible to access the Dutch NRC website (national newspaper).
This takes a very long time to run. It does eventually return.
Accessing the same website from the cmdline via wget or curl is super fast.
I've tested this on multiple PHP instances around the world, they all hang when running on
PHP8.1.12 or 8.1.13.
This same script ran fine (fast) on PHP 7.4.
Previous Comments:
------------------------------------------------------------------------
[2022-11-23 05:20:34] samira dot akhlaqi314 at gmail dot com
That's great. I was impressed by your writing. I am happy to see such a topic. Please come to
my blog and read it.
<https://www.subwaylistens.me/>/.php.net
------------------------------------------------------------------------
[2021-09-29 10:26:48] cmb@php.net
Related To: Bug #60465
------------------------------------------------------------------------
[2021-09-29 09:16:05] requinix@php.net
Related To: Bug #81487
------------------------------------------------------------------------
[2021-08-19 13:49:39] cmb@php.net
Related To: Bug #67352
------------------------------------------------------------------------
[2021-07-20 12:56:48] cmb@php.net
Related To: Bug #60465
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80931
--
Edit this bug report at https://bugs.php.net/bug.php?id=80931&edit=1