From:             kimmo dot laine at zarga dot net
Operating system: Windows 2003 IIS 6
PHP version:      5.1.2
PHP Bug Type:     Filesystem function related
Bug description:  is_file returns false for uploaded file

Description:
------------
Running IIS 6 on Windows 2003 server. 

After an update to the most recent version of php 5.1.2, for some reacon a
function handling uploaded using is_file stopped working. is_file failed
for existing files. I fixed it by changing is_file to file_exists, then it
worked again. Prior to the update, in the older version, presumably it was
5.0.1, is_file worked just fine without problems.


Reproduce code:
---------------
<?php
echo 'is_file:' . (is_file($_FILES['myfile']['tmp_name']) ? 'true' :
'false');
echo 'file_exists:' . (file_exists($_FILES['myfile']['tmp_name']) ? 'true'
: 'false');
 ?>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>"
enctype="multipart/form-data" method="post">
<input type="file" name="myfile" />
<input type="submit" />
</form>

Expected result:
----------------
is_file:truefile_exists:true

Actual result:
--------------
is_file:falsefile_exists:true

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

Reply via email to