php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bougu at touchtunes dot com
New email:
PHP Version: OS:

 

 [2009-09-11 17:33 UTC] bougu at touchtunes dot com
Description:
------------
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 
"var_dump(file_exists('c:\my_junction\index.php'));"
boolean(true)

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 
browser:

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-14 09:57 UTC] pajoye@php.net
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: Sat Dec 21 15:01:29 2024 UTC