php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21900 php upload malformed
Submitted: 2003-01-27 08:32 UTC Modified: 2003-02-03 08:33 UTC
From: phpbugs at serial dot nl Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.1-dev OS: FreeBSD 4.7-Stable
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbugs at serial dot nl
New email:
PHP Version: OS:

 

 [2003-01-27 08:32 UTC] phpbugs at serial dot nl
Hello,

I have a strage problem with php 4.2.3 and apache 2.0.44, the latest available versions in port tree of freebsd.

I'm using a standard php.ini.

The following occurs, when i upload a file using the following script :

<form enctype="multipart/form-data" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Upload een foto: <input name="userfile" type="file">
<input name="submitknop" type="submit" value="Send File">
</form>

<?
if (!empty($_FILES))
{
  move_uploaded_file
  (
    $_FILES['userfile']['tmp_name'],
    './test/'.$_FILES['userfile']['name']
  );
}
?>


I get a malformed file ( http://e.serial.nl/fout.jpg )

Is there a solution ?

thanks

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-27 09:06 UTC] phpbugs at serial dot nl
on a other machine using the same php/apache the script is working.
 [2003-01-27 09:09 UTC] sniper@php.net
So what differences ARE there between these two machines?
Does not sound like any bug in PHP -> bogus.

 [2003-01-27 09:20 UTC] phpbugs at serial dot nl
Bit fast to change the bug status to bogus, it's really there :

http://80.84.230.41/test/u.php

to view the image
http://80.84.230/41/test/test/<name of file>

the only difference between machines is the amount of system memory.
 [2003-01-27 18:56 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I can not reproduce this with PHP 4.3.1-dev (the latest stable snapshot) and Apache 1.3.27 / Apache 2.0.44

Please give the snapshot a try.

 [2003-02-02 08:31 UTC] phpbugs at serial dot nl
since the freebsd port is upgraded to 4.3.0 latest snapshot, i still have the same problem
 [2003-02-03 03:36 UTC] sniper@php.net
Please check the solution from bug #19263 and confirm
if it solves this.

 [2003-02-03 08:23 UTC] phpbugs at serial dot nl
you guys are great thanks !!!
 [2003-02-03 08:33 UTC] sniper@php.net
Closing as 'Bogus' then as it's not PHP bug.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC