From: dev at sonicunion dot co dot uk Operating system: Windows 98 SE PHP version: 4.2.3 PHP Bug Type: Filesystem function related Bug description: stat fails in fread() of fopen()'d file
Using the code: <?php $file = fopen("test_index.php", "rb"); $openedfile = fread ($file, filesize ($file)); $string = addslashes ($openedfile); eval ("\$string=\"$string\";"); $string = stripslashes ($string); ?> On my machine, it triggors the error: Warning: stat failed for Resource id #1 (errno=2 - No such file or directory) in c:\php\www\sonicunion_beta\\run.php on line 5 When error is surpressed, with @, the file read is not evaled. No other errors occur. Specs: Win98; Apache 1.3.2; PHP4.2.3; -- Edit bug report at http://bugs.php.net/?id=22257&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22257&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22257&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22257&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22257&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22257&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22257&r=support Expected behavior: http://bugs.php.net/fix.php?id=22257&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22257&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22257&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22257&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22257&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22257&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22257&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22257&r=gnused