ID: 47999 User updated by: phpbug at danf dot oib dot com Reported By: phpbug at danf dot oib dot com -Status: Feedback +Status: Open Bug Type: Filesystem function related Operating System: win32 only - Windows Server 2003 PHP Version: 5.2.9 New Comment:
Yes, D:\temp has Modify permission for Everyone. Remember, this worked in PHP 5.2.3 on the same server, so it can't be a permissions issue, assuming the method the tempnam() function uses to determine which directory to use was consistent from 5.2.3 forward. Previous Comments: ------------------------------------------------------------------------ [2009-04-17 10:45:00] [email protected] Check the permissions on the temporary files path (TEMP / TMP, or whatever it is set to in your system) or pass a path that is writable. ------------------------------------------------------------------------ [2009-04-17 03:34:46] phpbug at danf dot oib dot com Description: ------------ tempnam() does not create a temporary file, and silently fails. This worked fine in PHP 5.2.3, but starting failing in 5.2.6 (or somewhere in between). It still does not work in 5.2.8 or 5.2.9-1. I've tested with both the IIS module (php5isapi.dll) and php-cgi.exe, with the same results. open_basedir is off. Reproduce code: --------------- <?php $tempnam = tempnam('','random') or die("Can't create tmpfile.\n"); echo "Successfully created $tempnam.\n"; ?> Expected result: ---------------- Successfully created D:\temp\ran1E42.tmp. Actual result: -------------- Can't create tmpfile. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47999&edit=1
