|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49533 Can't load PHP files in junction directories
Submitted: 2009-09-11 17:33 UTC Modified: 2009-09-14 09:57 UTC
From: bougu at touchtunes dot com Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 5.3SVN-2009-09-11 (snap) OS: win32 only - Windows XP SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bougu at touchtunes dot com
New email:
PHP Version: OS:


 [2009-09-11 17:33 UTC] bougu at touchtunes dot com
I'm reposting this, which is the same as #48778, as I don't think that 
issue is a duplicate of #48746.

If my Apache's DocumentRoot directory is a junction point, PHP fails to 
open the actual file I'm trying to load.

For example, if I use C:/my_junction as the DocumentRoot, and try to 
load index.php found in that directory, it fails and PHP spits the 
following (see actual result).

Using the CLI version, I made sure file_exists returned true:

c:\xampp\php\php.exe -r 

Reproduce code:
- linkd c:\my_junction c:\some_other_dir
- Create index.php in c:\my_junction, containing anything
- Change apache config to use c:\my_junction as it's DocumentRoot
- Try to load http://<apache_server_address>/index.php

Note: linkd comes from the Windows 2000 Resource Kit:
"Links an NTFS directory to a target valid object name in Windows 2000."
I think there's other ways to create junction points; see #48746 for examples.

Expected result:
Correctly load index.php

Actual result:
The following is logged in Apache's error_log, and appears in my 

Warning: Unknown: failed to open stream: No such file or directory in 
Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:/my_junction/index.php' 
(include_path='.;C:\xampp\php\PEAR') in Unknown on line 0


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-14 09:57 UTC]
Duplicate of #48746 which is fixed now, commit will follow shortly and all SAPIs can then be tested.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 18:01:29 2024 UTC