Bug #74774 [Opn->Fbk]: file(): http:// wrapper is disabled after upgrade to PHP 7.1.6
| From: | cmb@php.net | Date: | Wed, 04 Aug 2021 14:20:48 +0000 |
| Subject: | Bug #74774 [Opn->Fbk]: file(): http:// wrapper is disabled after upgrade to PHP 7.1.6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235598@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74774&edit=1
ID: 74774
Updated by: cmb@php.net
Reported by: mumu at seznam dot cz
Summary: file(): http:// wrapper is disabled after upgrade to
PHP 7.1.6
-Status: Open
+Status: Feedback
Type: Bug
Package: Unknown/Other Function
Operating System: Windows Server 2016
PHP Version: 7.1.6
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This doesn't look like a bug in PHP, but rather a configuration
issue. Do you still have problems with this?
Previous Comments:
------------------------------------------------------------------------
[2017-06-19 05:35:10] mumu at seznam dot cz
I have forgot to mention that the error was raised by a scheduled script run via php.exe. As such,
the per-directory settings were not in effect so the global On switch should have been applied.
------------------------------------------------------------------------
[2017-06-18 12:05:07] mumu at seznam dot cz
Description:
------------
I started to get
file(): http:// wrapper is disabled in the server configuration by
allow_url_fopen=0
file(http://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.txt?date=17.06.2017):
failed to open stream: no suitable wrapper could be found
after upgrading from PHP 7.1.5 to 7.1.6.
The error disappears after downgrading back to 7.1.5.
No configuration change has been made. Just overwriting files from the windows distribution package
for the respective NTS VC14 x64 version.
I have double checked the change logs but found nothing relevant.
The php.ini contains per-directory settings of allow_url_fopen.
The following line throws the error:
$lines = file($url, FILE_IGNORE_NEW_LINES);
where
$url was http://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.txt?date=17.06.201
Test script:
---------------
The issue have appeared on the production server. I have immediately downgraded to PHP 7.1.5 so I
have no test script available.
Expected result:
----------------
The PHP behavior is the same for both 7.1.5 and 7.1.6 in this case.
Actual result:
--------------
An error message started to be thrown in 7.1.6.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74774&edit=1