Bug #72317 [NEW]: tempnam fails with prefix "php"

From: Date: Thu, 02 Jun 2016 15:35:22 +0000
Subject: Bug #72317 [NEW]: tempnam fails with prefix "php"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201408@lists.php.net to get a copy of this message
From: flip101 at gmail dot com Operating system: Windows 10 64 bits PHP version: 5.6.22 Package: *Directory/Filesystem functions Bug Type: Bug Bug description:tempnam fails with prefix "php" Description: ------------ Not sure if the "php" prefix is reserved, but if it is, it's not documented at https://secure.php.net/manual/en/function.tempnam.php Note: that i made up the expected results (on line 4), not sure how the random filename algorithm works. Test script: --------------- var_dump( file_exists(sys_get_temp_dir()), is_writable(sys_get_temp_dir()), sys_get_temp_dir(), tempnam(sys_get_temp_dir(), 'php'), tempnam(sys_get_temp_dir(), 'aaa') ); Expected result: ---------------- bool(true) bool(true) string(34) "C:\Users\flip101\AppData\Local\Temp" string(45) "C:\Users\flip101\AppData\Local\Temp\php2EC.tmp" string(45) "C:\Users\flip101\AppData\Local\Temp\aaaF2A.tmp" Actual result: -------------- bool(true) bool(true) string(34) "C:\Users\flip101\AppData\Local\Temp" bool(false) string(45) "C:\Users\flip101\AppData\Local\Temp\aaaF2A.tmp" -- Edit bug report at https://bugs.php.net/bug.php?id=72317&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72317&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72317&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72317&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72317&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72317&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72317&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72317&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72317&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72317&r=support Expected behavior: https://bugs.php.net/fix.php?id=72317&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72317&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72317&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72317&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72317&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72317&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72317&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72317&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72317&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72317&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72317&r=mysqlcfg

« previous php.bugs (#201408) next »