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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 01:01:33 2025 UTC