php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3123 GD-1.7.3 Can't create png on the fly & send to browser.
Submitted: 2000-01-06 15:51 UTC Modified: 2000-01-06 15:54 UTC
From: dloftis at corp dot olin dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.13 OS: QNX
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dloftis at corp dot olin dot com
New email:
PHP Version: OS:

 

 [2000-01-06 15:51 UTC] dloftis at corp dot olin dot com
Actually, php-4.0b3 with gd-1.7.3 libgd.a on QNX linked into apache_1.3.9.  Basic php works.  The script below complains 'Content header already sent'.  The below should output a simple rectangle to the browser??
<HTML>

<HEAD> TEST PAGE </HEAD>
<BODY>
<?php

Header("Content-type: image/png");
$im=imagecreate(150,30);
$white=ImageColorAllocate($im,255,255,255);
$black=ImageColorAllocate($im,0,0,0);
ImageFilledRectangle($im,0,0,150,30,$white);
ImagePng($im);
ImageDestroy($im);
?>
</BODY>
</HTML>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-06 15:54 UTC] rasmus at cvs dot php dot net
You can't mix HTML and image data in the same file.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 10 09:01:27 2025 UTC