[PHP-BUG] Bug #74638 [NEW]: When PHP couldn't upload binary file, it disappear error of key from $_FILES.

[email protected] ("aki dot sen dot 1209 at gmail dot com") Tue, 23 May 2017 12:28:48 GMT
Newsgroups php.standards
Message-ID <[email protected]>
From:             aki dot sen dot 1209 at gmail dot com
Operating system: Windows and LINUX
PHP version:      7.1.5
Package:          PHP Language Specification
Bug Type:         Bug
Bug description:When PHP couldn't upload binary file, it disappear error of key from $_FILES.

Description:
------------
For example, please write following html.

"""
<?php
ini_set("memory_limit", "5M");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sample</title>
</head>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
  File:<br />
  <input type="file" name="upfile" size="30" multiple><br />
  <br />
  <input type="hidden" name="myname" value="vicky">
  <input type="submit" value="upload" />
</form>
</body>
</html>
"""

Next, would you change the php.ini.

"""
php_value upload_max_filesize "5M"
php_value post_max_size "5M"
"""

Are you ready?
Let's upload something binary file from html which you wrote.
When we always judge error or success, we usually use "error" key in
$_FILES.
But I found that $_FILES become array of empty , when PHP couldn't
upload 'file' in 'PHP 7.1.5'.

I think that it is bug, right?
I want PHP developer team to investigate that.
Thanks.



-- 
Edit bug report at https://bugs.php.net/bug.php?id=74638&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74638&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74638&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74638&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74638&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74638&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74638&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74638&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74638&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74638&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74638&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74638&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74638&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74638&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74638&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74638&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74638&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74638&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74638&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74638&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74638&r=mysqlcfg