php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31726 GD -JPEG-JFIF error
Submitted: 2005-01-27 17:37 UTC Modified: 2005-02-01 10:05 UTC
From: skyfox at isp dot ee Assigned:
Status: Not a bug Package: *Graphics related
PHP Version: 4.3.10 OS: Debian
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: skyfox at isp dot ee
New email:
PHP Version: OS:

 

 [2005-01-27 17:37 UTC] skyfox at isp dot ee
Description:
------------
PHP Version 4.3.10
GD Support  enabled  
GD Version  bundled (2.0.28 compatible)  
FreeType Support  enabled  
FreeType Linkage  with freetype  
GIF Read Support  enabled  
GIF Create Support  enabled  
JPG Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
XBM Support  enabled  




Expected result:
----------------
but any jpeg(JFIF) make error:
Warning: imagecreatefromjpeg(): '/var/www/upload/60125' is not a valid
JPEG file in /var/www/amur/photo_new.php on line 39

Warning: imagesx(): supplied argument is not a valid Image resource in
/var/www/amur/photo_new.php on line 40

Warning: imagesy(): supplied argument is not a valid Image resource in
/var/www/amur/photo_new.php on line 41


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-27 17:41 UTC] iliaa@php.net
Please supply the image in question.
 [2005-01-28 08:33 UTC] skyfox at isp dot ee
http://www.amur.ee/~disa/60125
 [2005-01-28 08:43 UTC] skyfox at isp dot ee
http://www.amur.ee/~deni/60125
 [2005-01-28 21:49 UTC] tony2001@php.net
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. 

Thank you for your interest in PHP.

Have you tried to look at these images yourself?
60125 is definitely broken as even my viewer refuses to show it up correctly - only a half of the image is viewable.
 [2005-01-31 11:19 UTC] skyfox at isp dot ee
http://www.amur.ee/~deni/60672
this is not BROKEN PHOTO!
 [2005-01-31 11:25 UTC] derick@php.net
When opening it in GIMP I get the following error:

Corrupt JPEG data: 145 extraneous bytes before marked 0xd9

EXIF data will be ignored.
 [2005-01-31 16:37 UTC] skyfox at isp dot ee
Derick - try it by IE ;) no errors
 [2005-02-01 09:28 UTC] pajoye@php.net
We do not want to support broken images. Even if a broken IE can load them, accepting invalid images/data as valid data is the best to run in troubles.

--Pierre
 [2005-02-01 09:38 UTC] skyfox at isp dot ee
then verify broken upload photo not work!

this is from my code:
  if ($_FILES["photo"]["error"]==UPLOAD_ERR_NO_FILE) {return($lns[49]);}
  if ($_FILES["photo"]["error"]==UPLOAD_ERR_PARTIAL) {return($lns[50]);}
  if (($_FILES["photo"]["error"]==UPLOAD_ERR_INI_SIZE)
     ||($_FILES["photo"]["error"]==UPLOAD_ERR_FORM_SIZE)) {return($lns[51]);}
  if ($_FILES["photo"]["error"]<>UPLOAD_ERR_OK){return('Error:'.$_FILES["photo"]["error"]);}
 [2005-02-01 10:05 UTC] pajoye@php.net
Please stop to comment this bug. Your images are not valid. Fix them or ask your clients to fix them.

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