ID:               47999
 Updated by:       garre...@php.net
 Reported By:      phpbug at danf dot oib dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: win32 only - Windows Server 2003
 PHP Version:      5.2.9
-Assigned To:      
+Assigned To:      garretts
 New Comment:

I'm unable to reproduce this with PHP 5.2.9-2 and PHP 5.3.
I used your repro code, and tried: 

the command line:

   Successfully created
C:\Users\garretts\AppData\Local\Temp\ran81CC.tmp.

from a web page:

   Successfully created C:\Windows\Temp\ranBFA6.tmp. 




Previous Comments:
------------------------------------------------------------------------

[2009-04-17 16:41:22] phpbug at danf dot oib dot com

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.

------------------------------------------------------------------------

[2009-04-17 10:45:00] j...@php.net

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

Reply via email to