php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49417 resolving symlinks works unstable
Submitted: 2009-08-30 15:20 UTC Modified: 2009-08-30 16:03 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: info at libertydesign dot de Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.3.0 OS: Windows Vista
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: info at libertydesign dot de
New email:
PHP Version: OS:

 

 [2009-08-30 15:20 UTC] info at libertydesign dot de
Description:
------------
Symbolic links under Windows Vista doesnt work as expected anymore when using PHP 5.3 in combination with Apache 2.2.12.

See Code below.
Resolving to Base.php works. But using BASE_DIR in Base.php itself causes

Warning: require_once(C:\localhost\htdocs\page/lib/base/Database.class.php) [function.require-once]: failed to open stream: No such file or directory in C:\localhost\htdocs\page/lib/base/Base.php on line 7

Fatal error: require_once() [function.require]: Failed opening required 'C:\localhost\htdocs\page/lib/base/Database.class.php' (include_path='.;C:\localhost\php\pear\') in C:\localhost\htdocs\page\lib\base\Base.php on line 7

but sometimes it works, than i reload and it doesn't work again.
I don't know why. With PHP 5.2.9 it works as expected.


Reproduce code:
---------------
/* in C:\localhost\page/index.php */
// something like C:\localhost\page/
define('BASE_DIR', dirname(__FILE__).'/');

// the base dir is a symbolic link to C:\localhost\_base/
require_once(BASE_DIR.'lib/base/Base.php');



/* in C:\localhost\_base/Base.php */
require_once(BASE_DIR.'lib/base/Database.php');


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-30 15:45 UTC] pajoye@php.net
Symbolic links did not work at all with 5.2, junctions did (luckily). But the issues related to this change are in #48746.

Mark as bogus (duplicate and almost all issues are fixed in svn already). You can try a snapshot as well.
 [2009-08-30 15:56 UTC] info at libertydesign dot de
mh, i used 

c:\>mklink /d "C:\localhost\htdocs\page\lib\base" "C:\localhost\htdocs\_base"

and it works with 5.2.9.

Anyway :-) Thanks for your comment that it will be fixed in coming versions :-)
 [2009-08-30 16:03 UTC] pajoye@php.net
Relative path won't change, the way it works now (try a snapshot :) matches what we do on all other platforms.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 18:01:30 2024 UTC