php.net |  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-05-09 04:22 UTC
From: dev at eviweb dot fr Assigned: cmb (profile)
Status: No Feedback Package: Streams related
PHP Version: 5.6.5 OS: Ubuntu 14.04.1 LTS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-02-13 11:00 UTC] dev at eviweb dot fr
Description:
------------
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 https://github.com/eviweb/php-file-stream-wrapper-issue.git

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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-28 10:27 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-04-28 10:27 UTC] cmb@php.net
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] <https://www.php.net/supported-versions.php>
 [2021-05-09 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-2021 The PHP Group
All rights reserved.
Last updated: Sun May 09 14:01:24 2021 UTC