For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > March 2006 > #36860 [Bgs->Opn]: file:// does not work with allow_url_fopen=Off









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #36860 [Bgs->Opn]: file:// does not work with allow_url_fopen=Off
php-bugs at t43 dot mine dot nu

2006-03-25, 9:57 pm

ID: 36860
User updated by: php-bugs at t43 dot mine dot nu
Reported By: php-bugs at t43 dot mine dot nu
-Status: Bogus
+Status: Open
-Bug Type: Feature/Change Request
+Bug Type: Documentation problem
Operating System: Windows
PHP Version: 5.1.2
New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com