php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #37901 Unable to find the wrapper "file"
Submitted: 2006-06-23 12:30 UTC Modified: 2007-08-17 20:20 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: techtonik@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.4.2 OS: Windows2000
Private report: No CVE-ID: None
 [2006-06-23 12:30 UTC] techtonik@php.net
Description:
------------
file:// wrapper doesn't work on PHP 4.x.x, but it should according to docs http://php.net/opendir


Reproduce code:
---------------
<?php

file_get_contents('file://C:/autoexec.bat');
file_get_contents('file://C:\autoexec.bat');
file_get_contents('file:///autoexec.bat');

$dh = opendir('file://C:\temp');


Actual result:
--------------
PHP Notice:  file_get_contents(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in c:\test.php on line 3
PHP Warning:  file_get_contents(file://C:/autoexec.bat): failed to open stream: Invalid argument in c:\test.php on line 3
PHP Notice:  file_get_contents(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in c:\test.php on line 4
PHP Warning:  file_get_contents(file://C:\autoexec.bat): failed to open stream: Invalid argument in c:\test.php on line 4
PHP Notice:  file_get_contents(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in c:\test.php on line 5
PHP Warning:  file_get_contents(file:///autoexec.bat): failed to open stream: Invalid argument in c:\test.php on line 5
PHP Notice:  opendir(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in c:\test.php on line 7
PHP Warning:  opendir(file://C:\temp): failed to open dir: Invalid argument in c:\test.php on line 7

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-23 12:46 UTC] tony2001@php.net
The docs are wrong, there is no such wrapper in PHP4.
 [2007-08-17 20:20 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 12:01:33 2025 UTC