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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 20:01:29 2024 UTC