php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49742 fopen error
Submitted: 2009-10-02 01:34 UTC Modified: 2009-10-02 07:42 UTC
From: kanadian at kanadian dot net Assigned:
Status: Not a bug Package: Filesystem function 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: kanadian at kanadian dot net
New email:
PHP Version: OS:

 

 [2009-10-02 01:34 UTC] kanadian at kanadian dot net
Description:
------------
fopen failes to read after making of junction with exec("mklink target link") and symlink(target, link) failes totaly

Reproduce code:
---------------
<?php
$link = "c:\new\"
$linkfile = "test.txt";
$target = "c:\users\User_Name\music\";
$mklink = $link." ".$target;

symlink($link, $target); // failes totaly
exec("mklink /j ".$mklink); // works
fclose(fopen($linkfile, "x")); // will work to create the file
$handler = fopen($linkfile, "rb"); // fails to open file

echo is_file($linkfile); // returns true as file is there

?>

Expected result:
----------------
to open/read the file behind a junction link

Actual result:
--------------
fails to open/read behind junction link

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-02 07:42 UTC] pajoye@php.net
Already reported and fixed in SVN. Try a SNV snapshot.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 12:01:30 2024 UTC