From: Operating system: All Windows OS PHP version: 5.3SVN-2010-05-13 (SVN) Package: SPL related Bug Type: Bug Bug description:SplFileInfo::getLinkTarget() Fails.
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 -- Edit bug report at http://bugs.php.net/bug.php?id=51804&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51804&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51804&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51804&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51804&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51804&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51804&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51804&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51804&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51804&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51804&r=support Expected behavior: http://bugs.php.net/fix.php?id=51804&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51804&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51804&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51804&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51804&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51804&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51804&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51804&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51804&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51804&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51804&r=mysqlcfg