Bug #48746 [Csd]: Unable to browse directories within Junction Points
From: pajoye@php.net Date: Mon, 12 Jul 2010 12:22:06 +0000 Subject: Bug #48746 [Csd]: Unable to browse directories within Junction Points References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-152296@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=48746&edit=1
ID: 48746
Updated by: pajoye@php.net
Reported by: ddkees at illinois dot edu
Summary: Unable to browse directories within Junction Points
Status: Closed
Type: Bug
Package: Directory function related
Operating System: win32 only - Windows Server 2003
PHP Version: 5.3.0
Assigned To: pajoye
New Comment:
It is the way it works on all platforms. It was only not support on
windows with 5.2. However 5.3 and later support symlinks and junctions.
Please read the documentation about symlink support in php and how they
work. There is no bug here.
Previous Comments:
------------------------------------------------------------------------
[2010-07-12 14:16:14] M8R-jw2mu7 at mailinator dot com
I don't know if at this point I should file a new defect.
Let's say we have this structure:
H:\www\site1\media\junction ( => I:\resources)
Let's say we call page.php in a browser:
$_SERVER['SCRIPT_FILENAME'] is 'h:/www/(etc.)'
dirname(...) works OK.
<?php
require_once( dirname($_SERVER['SCRIPT_FILENAME']). "/../inc/config.php"
);
?>
will yield an error: it does not try to load
H:\www\site1\media\inc\config.php
but
I:\inc\config.php (I:\resources/../inc/config.php)
Also, a realpath() on the included string returns false.
------------------------------------------------------------------------
[2010-07-12 14:05:31] pajoye@php.net
The results in 5.3 are correct.
------------------------------------------------------------------------
[2010-07-12 13:58:09] M8R-jw2mu7 at mailinator dot com
pajoye at php dot net:
I get your point, but what about the lstat() part ?
"Gathers the statistics of the file or symbolic link named by
filename."
Shouldn't it work for directory symlinks as well?
------------------------------------------------------------------------
[2010-07-12 13:52:28] M8R-jw2mu7 at mailinator dot com
Replying to myself:
I think this is by design.
http://php.net/manual/en/language.constants.predefined.php
says:
__FILE__ The full path and filename of the file. If used inside an
include, the name of the included file is returned. Since PHP 4.0.2,
__FILE__ always contains an absolute path with symlinks resolved whereas
in older versions it contained relative path under some circumstances.
Maybe $_SERVER['SCRIPT_FILENAME'] should be used instead?
------------------------------------------------------------------------
[2010-07-12 13:49:59] pajoye@php.net
M8R-jw2mu7 at mailinator dot com:
That's expected. 5.2 did not support link or junction resolutions.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=48746
--
Edit this bug report at http://bugs.php.net/bug.php?id=48746&edit=1
Thread (70 messages)
- #48746 [Opn]: Unable to browse directories within Junction Points
- #48746 [Opn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk->Opn]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Opn->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Asn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [NoF->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Bgs]: Unable to browse directories within Junction Points
- #48746 [Bgs->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [NoF->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Fbk]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [Com]: Unable to browse directories within Junction Points
- #48746 [NoF->Fbk]: Unable to browse directories within Junction Points
- #48746 [Fbk->Bgs]: Unable to browse directories within Junction Points
- #48746 [Bgs->Asn]: Unable to browse directories within Junction Points
- #48746 [Asn->Csd]: Unable to browse directories within Junction Points
- Bug #48746 [Com]: Unable to browse directories within Junction Points
- Bug #48746 [Csd]: Unable to browse directories within Junction Points
- Bug #48746 [Com]: Unable to browse directories within Junction Points
- Bug #48746 [Com]: Unable to browse directories within Junction Points
- Bug #48746 [Csd]: Unable to browse directories within Junction Points
- Bug #48746 [Com]: Unable to browse directories within Junction Points
- Bug #48746 [Csd]: Unable to browse directories within Junction Points
- Bug #48746 [Com]: Unable to browse directories within Junction Points
- Bug #48746 [Com]: Unable to browse directories within Junction Points
| « previous | php.bugs (#152296) | next » |
|---|