Doc #52835 [NEW]: readfile sample allows directory download

From: Date: Tue, 14 Sep 2010 08:29:13 +0000
Subject: Doc #52835 [NEW]: readfile sample allows directory download
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5023@lists.php.net to get a copy of this message
From: Operating system: PHP version: 5.3.3 Package: Documentation problem Bug Type: Documentation Problem Bug description:readfile sample allows directory download Description: ------------ For the readfile function, sample 1, "Forcing a download using readfile()" uses file_exists to check whether $file is valid. However, if there is a directory by the name of $file, the sample code causes PHP to try to download the directory, which will likely be meaningless to the client. Expected result: ---------------- The sample should use is_file. Actual result: -------------- The sample currently uses file_exists. -- Edit bug report at http://bugs.php.net/bug.php?id=52835&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52835&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52835&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52835&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52835&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52835&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52835&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52835&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52835&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52835&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52835&r=support Expected behavior: http://bugs.php.net/fix.php?id=52835&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52835&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52835&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52835&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52835&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52835&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52835&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52835&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52835&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52835&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52835&r=mysqlcfg

« previous php.doc.bugs (#5023) next »