Bug #74040 [Opn]: file_get_contents not working anymore for adresses not on domain (timeout)
Edit report at https://bugs.php.net/bug.php?id=74040&edit=1
ID: 74040
Updated by: rasmus@php.net
Reported by: everdij at gmail dot com
Summary: file_get_contents not working anymore for adresses
not on domain (timeout)
Status: Open
Type: Bug
Package: *General Issues
PHP Version: 7.1.1
Block user comment: N
Private report: N
New Comment:
That's still not enough details. Your example works for us. Try it on a different server. This
is most likely a local network configuration issue. Like a firewall blocking outbound http requests.
Previous Comments:
------------------------------------------------------------------------
[2017-02-04 12:06:09] everdij at gmail dot com
Not working (gives time out)
$file_contents = "https://google.nl";
$body = file_get_contents($file_contents);
var_dump($body);
Not working gives timeout
$file_contents = "https://google.nl";
$body = file_get_contents($file_contents,null,null,null,null);
var_dump($body);
Works
$file_contents = "../local_file.txt";
$body = file_get_contents($file_contents);
var_dump($body);
Curl works! so looks like nothing to do with network setup
------------------------------------------------------------------------
[2017-02-03 15:07:44] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Make sure it's not a problem with your network configuration.
------------------------------------------------------------------------
[2017-02-03 15:00:10] everdij at gmail dot com
Description:
------------
file_get_contents not working anymore for adresses not on domain (timeout)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74040&edit=1
Thread (8 messages)