php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9418 Upload image file is broken
Submitted: 2001-02-23 05:04 UTC Modified: 2001-04-09 07:57 UTC
From: nekto at iname dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.4pl1 OS: FreeBSD 4.2
Private report: No CVE-ID: None
 [2001-02-23 05:04 UTC] nekto at iname dot com
I have a problem with upload gif image (original differ from upload image). With yours recommendation, i install last cvs version of php4. But this not solved my problem. What i must doing for solving my problem?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-24 13:23 UTC] jmoore@php.net
Not enough information supplied closing.
 [2001-02-25 18:28 UTC] lyric@php.net
Reopening. jmoore : what's the hurry to close something just one day after the issue is reported?

nekto replied "What info yuo need?"
nekto: well 
 does the uploaded file exist?
 does the file >0 filesize?
 what are the differences between the files - is the uploaded file prepended with a content-type header?
 what code are you using to reference the uploaded file?
 [2001-02-25 22:28 UTC] nekto at iname dot com
Hi!
1. yes, uploaded file exsit

2. filesize uploaded file equal filesize of original, but cmp say, what this files differ

cmp file1.gif file2.gif
file1.gif file2.gif differ: char 8, line 1

3. both file begin with string:
GIF89

4. I open files in browser using http address:
http://my.website.com/path/file.gif


 [2001-02-27 08:45 UTC] sniper@php.net
And the example script is where?

--Jani

 [2001-02-27 21:41 UTC] nekto at iname dot com
Ok, this fragment of my script:

<form enctype="multipart/form-data" method="post" action="<? $PHP_SELF ?>?action=add">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">

<..... skip .....>

    <tr>
      <td width="29%" height="30"><? print $lang["photo"]?></td>
      <td width="71%" height="30">
        <input type="file" name="photo" size="50" maxlength="255">
      </td>
    </tr>

<......skip.......>

 </table>
  <p>
    <input type="reset" name="Reset" value="<? print $lang["reset"]?>">
    <input type="submit" name="Submit" value="<? print $lang["save"]?>">
  </p>
</form>

<......skip.......>

copy ($photo, $photopath.$id);
unlink($photo);



 [2001-03-01 17:14 UTC] sniper@php.net
And you're using the latest CVS snapshot from http://snaps.php.net/ ?

--Jani

 [2001-03-01 21:43 UTC] nekto at iname dot com
Yes, 23 feb i download cvs snapshot from cvs.php.net
make 
make install
but this not help me :(...
 [2001-03-03 19:17 UTC] sniper@php.net
I can not reproduce this. Are you sure you're comparing the right images??
Are the uploaded images displayed at all?

--Jani

 [2001-03-04 22:40 UTC] nekto at iname dot com
I make this experiment: 
1) upload image via php. Uploaded image not visible.
2) upload image via ftp (binary) mode. This image is normal visible. 
After that i compare both image with cmp command. Cmp say, what images different.
I can send you my image for probe. 
May be i must try download cvs from snaps.php.net (early i download it from cvs.php.net). May be cvs snapshot on this sites different?
 [2001-03-27 04:49 UTC] nekto at iname dot com
Hi! I trying snapshot from 22-Mar-2001 - but this not help me. May be in new stable release problem with images will be solved?
 [2001-04-03 10:01 UTC] sniper@php.net
Please try latest snapshot from http://snaps.php.net/
If problem still persists, please send me the original
and uploaded (via form) images to sniper@php.net

--Jani

 [2001-04-09 07:57 UTC] sniper@php.net
Feedback:
---------

Hey, i solve problem. On catalog with php upload script i set
directive:
CharsetDisable on
Now - all ok.

-------

This was with Apache which had mod_charset included. 
(Russian)

Just wondering why adding --with-mod_charset doesn't do anything?


--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC