php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8958 File uploads append Content-Type string
Submitted: 2001-01-27 18:20 UTC Modified: 2001-02-20 06:12 UTC
From: medvitz at medvitz dot net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS: Linux - RedHat 7.0
Private report: No CVE-ID: None
 [2001-01-27 18:20 UTC] medvitz at medvitz dot net
Doing file uploads with php 4.0.4pl1 on RH7 (RedHat RPMs) appends the Content-Type: xxxx/xxxxx  line to the top of the files.

-- Medvitz


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-27 20:50 UTC] mrobinso@php.net
Please provide a short snippet of code that
reproduces this effect. 
 [2001-01-28 15:29 UTC] medvitz at medvitz dot net
Being that it happens to every file uploaded, I don't know how helpful this will be but......

$file = $HTTP_POST_FILES['file']['tmp_name'];
$file_name = $HTTP_POST_FILES['file']['name'];
@mkdir("../Images/new/$owner",0775);
copy($file,"../Images/new/$owner/$file_name");

Now, the file created has the Content-type: xxx/xxxxx  plus an additional blank line at the top of the file.....
 [2001-02-04 12:40 UTC] sniper@php.net
I can not reproduce this with latest CVS. 
Please try latest CVS snapshot from http://snaps.php.net/

--Jani

 [2001-02-19 17:27 UTC] lyric@php.net
Duplicate of http://bugs.php.net/bugs.php?id=9298 which is fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC