php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32389 imagecreatefrompng terminates connection
Submitted: 2005-03-21 04:26 UTC Modified: 2005-04-05 01:00 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jbaou at datahost dot gr Assigned: pajoye (profile)
Status: No Feedback Package: GD related
PHP Version: 5.0.3 OS: Slackware 10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jbaou at datahost dot gr
New email:
PHP Version: OS:

 

 [2005-03-21 04:26 UTC] jbaou at datahost dot gr
Description:
------------
I am trying to create thumbs from image types: jpg,gif and png.    
jpg and gif work OK.    
   
While trying to create a png thumb i get the following error:    
Connection to host jbaou.bahaha.org is broken.  
 
## php -m 
[PHP Modules] 
bcmath 
bz2 
calendar 
ctype 
curl 
dba 
dbase 
dbx 
dio 
dom 
exif 
filepro 
ftp 
gd 
gettext 
gmp 
iconv 
imap 
libxml 
mbstring 
mhash 
mime_magic 
mysql 
ncurses 
openssl 
pcre 
posix 
session 
shmop 
SimpleXML 
sockets 
SPL 
SQLite 
standard 
sysvmsg 
sysvsem 
sysvshm 
tokenizer 
wddx 
xml 
yp 
Zend Optimizer 
zlib 
 
[Zend Modules] 
Zend Extension Manager 
Zend Optimizer 
 
## ./configure 
http://jbaou.bahaha.org/phpinfo.php 

Reproduce code:
---------------
if ($ext == ".png") {
$im = imagecreatefrompng($image); //fe
$thumb = imagecreatetruecolor($thumbWidth, $thumbHeight);
ImageCopyResampled($thumb, $im, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $imageDim[0], $imageDim[1]);
imagepng($thumb, $thumbPath.$imgName);
imagedestroy($im);
}

alt: http://jbaou.bahaha.org/browser.phps 
[method makeThumb($image)]

Expected result:
----------------
a thumbnail :D  

Actual result:
--------------
While trying to create a png thumb i get the following error:    
Connection to host jbaou.bahaha.org is broken.  

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-21 08:05 UTC] pajoye@php.net
Please provide the png images (links), your configure script and the libpng version.

--Pierre
 [2005-03-22 05:32 UTC] jbaou at datahost dot gr
I actually noticed that it works for SOME png images.
http://jbaou.bahaha.org/browser.php?dir=.%2FImages%2FChristiana here it works. mouse over to check it.

http://jbaou.bahaha.org/browser.php?dir=.%2FImages%2FWallpapers%2FDreamingOfTheFuture here is a folder with another png image.

libpng ver: 1.2.8

i am sorry i cant be of any more help. i havent compiled with --enable-debug and i don't really have the time to recompile. I am currently in greece and i will be here for at least 21 days.
 [2005-03-28 04:56 UTC] pajoye@php.net
These images are all jpeg.

Please provide PNG images and change your bug description if it's related to jpeg image.

--Pierre
 [2005-03-28 05:01 UTC] pajoye@php.net
Found one there :) Sorry.

Cannot reproduce a crash or an error.

Please try using only this script:
error_reporting(E_ALL);
$im = imagecreatefrompng("yourimage.png");
imagepng("new.png");

If you have an image that crashes php, provide a direct link to it.

--Pierre


 [2005-04-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC