|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69050 User defined file stream wrapper called only once even after page reload
Submitted: 2015-02-13 11:00 UTC Modified: -
From: dev at eviweb dot fr Assigned:
Status: Open Package: Streams related
PHP Version: 5.6.5 OS: Ubuntu 14.04.1 LTS
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: dev at eviweb dot fr
New email:
PHP Version: OS:


 [2015-02-13 11:00 UTC] dev at eviweb dot fr
A user defined stream wrapper for the file protocol is called only once even if you reload your page.
It occurs when you include/require a file without the explicit file:/// protocol.
This independently of the allow_url_include value.

When the required path is prefixed with the file:/// protocol, the wrapper is correctly created on each page reload, which is the expected behaviour.

There should not be differences between requiring a file with or without specifying the file protocol.

Test script:
please clone this repository

check the execute permissions are set on the ./start-server script and run it.
Then go to http://localhost:8000.
Click twice on each links and check expected and actual test results.
I noticed on my environment that for the implicit-file test, the file stream wrapper instance is created only during the first run and nevermore.

Expected result:
When registered, a user defined stream wrapper for the file protocol should be created on each page load when a file is included/required, even if the file path is not prefixed with file:///.

Actual result:
The wrapper is created on the first page load and nevermore.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Apr 14 04:01:24 2021 UTC