|  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: 2021-04-28 10:27 UTC
From: dev at eviweb dot fr Assigned: cmb (profile)
Status: Feedback Package: Streams related
PHP Version: 5.6.5 OS: Ubuntu 14.04.1 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-28 10:27 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-04-28 10:27 UTC]
I cannot reproduce the reported behavior (although I'm not sure
what you trying to accomplish at all).  Anyhow, can you still
reproduce this with any of the actively supported PHP versions[1]?

[1] <>
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 06 13:01:23 2021 UTC