|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesadd_php_sys_readlink (last revision 2010-09-06 15:14 UTC by [email protected])Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-07 01:56 UTC] [email protected]
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: pajoye
[2010-08-07 01:56 UTC] [email protected]
[2010-09-06 17:14 UTC] [email protected]
[2010-09-10 16:17 UTC] [email protected]
[2010-09-10 16:18 UTC] [email protected]
-Status: Assigned
+Status: Closed
-Type: Bug
+Type: Feature/Change Request
[2010-09-10 16:18 UTC] [email protected]
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 31 03:00:01 2025 UTC |
Description: ------------ SplFileInfo::getLinkTarget() fails .we have a filesymlink created for a file (filesymbolic.txt) and tried to read the target of the filesymlink created and it returns an error .This happens for Directory also. When this Function used on accessing symlinks over remote share it returns an error with 'Bad File Descriptor'. Test script: --------------- <?php $filename = dirname(__FILE__)."\\filesymlink"; var_dump(file_exists($filename)); $filesyminfo = new SplFileInfo($filename); var_dump($filesyminfo->getLinkTarget()); ?> Expected result: ---------------- bool(true) string(16) filesymbolic.txt Actual result: -------------- bool(true) Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to read link C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\symlinktodir, error: No such file or directory' in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\getLinkTarget.php:5 Stack trace: #0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\getLinkTarget.php(5): SplFileInfo->getLinkTarget() #1 {main} thrown in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\getLinkTarget.php on line 5