|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22185 problem with creating images
Submitted: 2003-02-12 06:37 UTC Modified: 2003-02-12 10:21 UTC
From: michal dot mikes at ecomma dot cz Assigned:
Status: Not a bug Package: *Graphics related
PHP Version: 4.3.0 OS: WINNT4.0
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.
Block user comment
Status: Assign to:
Bug Type:
From: michal dot mikes at ecomma dot cz
New email:
PHP Version: OS:


 [2003-02-12 06:37 UTC] michal dot mikes at ecomma dot cz
I have a simple script that create image. Everything works right since I put "session_start()" into the script. Then result isn't short PNG image, but large BMP image.


$im = imagecreate (50, 250); 
$bgcolor = ImageColorAllocate ($im, 0x77, 0x77, 0x77); 
$textcolor = ImageColorAllocate ($im, 0x00, 0x00, 0x00); 
$font = "./arial";
ImageTTFText ($im, 35, 90, 40, 230, $textcolor, $font, "text"); 
Imagepng ($im); 
ImageDestroy ($im); 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-12 10:21 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

I am assuming you have session.use_trans_sid enabled, meaning that PHP will try to modify the input data by inserting session is where needed. Since your output is binary data (image file) this option will most likely result in image corruption.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 22:01:29 2024 UTC