php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74774 file(): http:// wrapper is disabled after upgrade to PHP 7.1.6
Submitted: 2017-06-18 12:05 UTC Modified: 2021-08-15 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mumu at seznam dot cz Assigned: cmb (profile)
Status: No Feedback Package: Unknown/Other Function
PHP Version: 7.1.6 OS: Windows Server 2016
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mumu at seznam dot cz
New email:
PHP Version: OS:

 

 [2017-06-18 12:05 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-19 05:35 UTC] 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.
 [2021-08-04 14:20 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-04 14:20 UTC] cmb@php.net
This doesn't look like a bug in PHP, but rather a configuration
issue.  Do you still have problems with this?
 [2021-08-15 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 18:02:35 2024 UTC