#41180 [Opn->Bgs]: File upload with PDF file results in incorrect mime type
| From: | tony2001@php.net | Date: | Tue, 24 Apr 2007 16:01:01 +0000 |
| Subject: | #41180 [Opn->Bgs]: File upload with PDF file results in incorrect mime type | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111862@lists.php.net to get a copy of this message | ||
ID: 41180
Updated by: tony2001@php.net
Reported By: andrew dot nagy at villanova dot edu
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Linux
PHP Version: 5.2.1
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
PHP has nothing to do with mime types.
Previous Comments:
------------------------------------------------------------------------
[2007-04-24 15:36:43] andrew dot nagy at villanova dot edu
Description:
------------
Any file upload scripts on 2 seperate servers that allow PDF uploads
are resulting in a mime type of application/x-pilot which is obviously
incorrect. We tested with numerous PDF files as well as on 2 seperate
servers. One Fedora Linux and one RedHat Linux. Both used v5.1.6
initially, we then upgraded to 5.2.1 with the same problem.
Reproduce code:
---------------
<form method="post" enctype="multipart/form-data">
<input type="file" name="myfile">
<input type="submit" name="submit" value="submit">
</form>
<?php
if (isset($_POST['submit'])) {
print_r($_FILES);
}
?>
Expected result:
----------------
Array
(
[myfile] => Array
(
[name] => bdbxml.pdf
[type] => application/pdf
[tmp_name] => /tmp/php9OEgjj
[error] => 0
[size] => 145709
)
)
Actual result:
--------------
Array
(
[myfile] => Array
(
[name] => bdbxml.pdf
[type] => application/x-pilot
[tmp_name] => /tmp/php9OEgjj
[error] => 0
[size] => 145709
)
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41180&edit=1