From:             marc at phpmyadmin dot net
Operating system: Linux
PHP version:      5.4.5
Package:          GD related
Bug Type:         Bug
Bug description:Incorrect image generated

Description:
------------
The test script (master.html calling image.php) works fine with PHP 5.3.13
but fails to produce an image with PHP 5.4.4 or 5.4.5.

'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-libdir=lib64' '--disable-debug' '--enable-calendar'
'--with-gd=shared' '--with-freetype-dir' '--with-mysql=shared,mysqlnd'
'--with-mysqli=shared,mysqlnd' '--with-regex=php' '--with-png-dir=/usr/lib'
'--with-zlib=shared' '--with-iconv=shared' '--enable-ftp'
'--with-mcrypt=shared' '--with-bz2=shared' '--enable-zip'
'--with-jpeg-dir=/usr/lib' '--enable-mbstring' '--without-sqlite'
'--enable-dom' '--enable-json' '--with-pdo-mysql=mysqlnd' '--with-pear'
'--enable-bcmath' '--with-curl=shared' '--with-ldap=shared,/usr'
'--with-gettext=shared' '--with-snmp=shared' '--enable-soap'
'--enable-sockets' 

Test script:
---------------
master.html:
<html>
<head></head>
<body>
<img border="0" alt="the photo should be here" src="image.php" />
</body>
</html>

image.php:
<?php
$contents = file_get_contents('marc.jpg');
header('Content-Type: image/JPEG');
header('Content-Transfer-Encoding: binary');

$srcImage = imagecreatefromstring($contents);
ImageJPEG($srcImage, '', 75);
?>


Expected result:
----------------
A photo is displayed.

Actual result:
--------------
The alt tag of the photo is displayed.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62632&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62632&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62632&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62632&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62632&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62632&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62632&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62632&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62632&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62632&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62632&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62632&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62632&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62632&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62632&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62632&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62632&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62632&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62632&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62632&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62632&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62632&r=mysqlcfg

Reply via email to