php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24869 Image functions don't work
Submitted: 2003-07-30 06:44 UTC Modified: 2003-07-30 11:04 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: spam at jerome-gamez dot de Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.2 OS: Debian Linux 3
Private report: No CVE-ID: None
 [2003-07-30 06:44 UTC] spam at jerome-gamez dot de
Description:
------------
This script below does not lead to an image with some text on it, but to a set of chars, as you can see on 
http://drupal.smallbrainer.de/font.php

We are using PHP 4.3.2, see our phpinfo: 

http://www.smallbrainer.de/phpinfo.php

Reproduce code:
---------------
<?php
//  header("Content-type: image/jpeg");
  $im = imagecreate(400,30);
  $white = imagecolorallocate($im, 255,255,255);
  $black = imagecolorallocate($im, 0,0,0);
  
  // Replace path by your own font path
  // imagettftext($im, 20, 0, 10, 20, $black, "/var/www/web1/html/sb-drupal/fonts/slkscr.ttf", "Testing... Omega: &amp;#937;");
  imagejpeg($im);
  imagedestroy($im);
?>

Expected result:
----------------
An image with some text on it.

Actual result:
--------------
Result is visible at http://drupal.smallbrainer.de/font.php.

- A set of chars, but not an image 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-30 09:04 UTC] sniper@php.net
If you removed the //'s in front of the 'header()' and '
 [2003-07-30 09:04 UTC] sniper@php.net
Remove the commments in front of the header() and imagettftext() lines. Not bug.

 [2003-07-30 10:56 UTC] spam at jerome-gamez dot de
I have just forgotten to delete the comments... It does not work in both versions.

This one does not work, too.

<?php
  header("Content-type: image/jpeg");
  $im = imagecreate(400,30);
  $white = imagecolorallocate($im, 255,255,255);
  $black = imagecolorallocate($im, 0,0,0);
  
  // Replace path by your own font path
  imagettftext($im, 20, 0, 10, 20, $black,
"/var/www/web1/html/sb-drupal/fonts/slkscr.ttf", "Testing... Omega:
&amp;#937;");
  imagejpeg($im);
  imagedestroy($im);
?>

Greetings
- J?r?me
 [2003-07-30 11:03 UTC] sniper@php.net
Works fine for me, must be something wrong in your end.
Most likely the script errors out or something.

 [2003-07-30 11:04 UTC] sniper@php.net
(I tried with the latest CVS, not 4.3.2..)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 14 17:01:33 2024 UTC