#36860 [Opn]: file:// does not work with allow_url_fopen=Off

From: Date: Sun, 26 Mar 2006 01:28:53 +0000
Subject: #36860 [Opn]: file:// does not work with allow_url_fopen=Off
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969372476@lists.php.net to get a copy of this message
ID: 36860 User updated by: php-bugs at t43 dot mine dot nu Reported By: php-bugs at t43 dot mine dot nu Status: Open Bug Type: Documentation problem Operating System: Windows PHP Version: 5.1.2 New Comment: In addition file:// could be allowed anyway, even if allow_url_fopen=Off, for easier programming. Previous Comments: ------------------------------------------------------------------------ [2006-03-26 03:27:27] php-bugs at t43 dot mine dot nu Regarding 1), illegal URL, but the php Manual, appendix M has the following text: "file:// is the default wrapper. ... Explicitly using file:// since PHP 4.3.0 /path/to/file.ext relative/path/to/file.ext fileInCwd.ext C:/path/to/winfile.ext C:\path\to\winfile.ext \\smbserver\share\path\to\winfile.ext file:///path/to/file.ext" "Default wrapper" wording leads to the idea that file:// is being prefixed implicitely to all forms, and can therefore be prefixed explicitely too. ------------------------------------------------------------------------ [2006-03-26 01:00:27] tony2001@php.net 1) file:// without c:/ or additional / is invalid URL. 2) there is allow_url_include in PHP6, but it won't be backported to 5.1. Not sure about 5.2, though. ------------------------------------------------------------------------ [2006-03-25 22:26:05] php-bugs at t43 dot mine dot nu Description: ------------ As I set allow_url_fopen=Off,the stream prefix file:// is not accepted. In addition, relative paths do not work with allow_url_fopen=On. i.e. require('file://include.inc.php') obtains an error, but require('file://c:/mydirectories/public/include.inc.php') does work perfectly. The error message to require('file://include.inc.php') is: Warning: require() [function.require]: remote host file access not supported, file://include.inc.php in C:\mydirectories\public\myscript.php on line 999 Reproduce code: --------------- require('file://include.inc.php'); Expected result: ---------------- same as when doing require('include.inc.php'); and additionally no matter if allow_url_fopen=On/Off ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36860&edit=1

« previous php.doc (#969372476) next »