From:             tomas dot hlavacek at telekomaustria dot cz
Operating system: Windows Server 2008
PHP version:      5.2.6
PHP Bug Type:     *Configuration Issues
Bug description:  IIS7 FastCGI - upload_tmp_dir not working correctly

Description:
------------
Hello,

in php.ini I have set upload_tmp_dir directive to "e:\php5-uploadtemp".
phpinfo() confirms, the directive is set to this value. But PHP is using
C:\Windows\Temp for uploading files instead. This is confirmed by printing
$_FILES['uploadedfile']['tmp_name'] in script.

Server configuration:
---------------------
Windows Server 2008
IIS 7
PHP 5.2.6 as FastCGI module with fastcgi.impersonate = 1


phpcgi.exe processes are running with "Network Service" privileges (same
as w3wp.exe) and are impersonating to IUSR_xxx accounts (each customer has
one). IUSR_xxx accounts are members of "IIS_IUSRS" group.


Rights on folders:

C:\>icacls c:\windows\temp
c:\windows\temp CREATOR OWNER:(OI)(CI)(IO)(F)
                NT AUTHORITY\SYSTEM:(OI)(CI)(F)
                BUILTIN\Administrators:(OI)(CI)(F)
                BUILTIN\Users:(CI)(S,WD,AD,X)
                BUILTIN\IIS_IUSRS:(OI)(CI)(M)

C:\>icacls e:\php5-uploadtemp
e:\php5-uploadtemp BUILTIN\IIS_IUSRS:(OI)(CI)(M)
                   BUILTIN\Administrators:(I)(OI)(CI)(F)
                   NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)



Under Windows Server 2003, IIS6, PHP5 as CGI, with same configuration it
was working.

The rights should be ok, because I have also set session.save_path =
e:\php5-sessiondata with same rights as on e:\php5-uploadtemp and this is
working correctly.


Reproduce code:
---------------
<?
...
print $_FILES['uploadedfile']['tmp_name'];
...
?>


Expected result:
----------------
e:\php5-uploadtemp\php214E.tmp

Actual result:
--------------
C:\Windows\Temp\php214E.tmp

-- 
Edit bug report at http://bugs.php.net/?id=46378&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46378&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46378&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46378&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46378&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46378&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46378&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46378&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46378&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46378&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46378&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46378&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46378&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46378&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46378&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46378&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46378&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46378&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46378&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46378&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46378&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46378&r=mysqlcfg

Reply via email to