php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25438 GD Fails drawing more than one image with TTF at one time
Submitted: 2003-09-08 16:49 UTC Modified: 2003-09-10 18:37 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sven at weih dot de Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.3 OS: Windows XP
Private report: No CVE-ID: None
 [2003-09-08 16:49 UTC] sven at weih dot de
Description:
------------
Hi,

i am drawing images using Apache 2 and GD2. Whenever I draw two images at the same time, there is a locking problem with the True Type Font. In some cases Apache 2 crashes, in others php throws a failure.

Sven.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-08 18:53 UTC] sniper@php.net
Please provide a short example.

 [2003-09-09 12:10 UTC] sven at weih dot de
here is some code for reproducing the error. Note, it works sometimes, but mostly there are errors.

--- code for sample.php ---

<?php
header ("Content-type: image/png");
$im = @ImageCreate (200, 200)
      or die ("Cannot create image stream");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
$font = "c:/windows/fonts/arial.ttf";

for ($i=0; $i<360; $i+=5) {
  ImageTTFText ($im, 12, $i, 50, 50, $text_color, $font, 
               "Draw sample text.");
}
ImagePNG ($im);
?>


--- end of sample.php ---

--- code of reproduce.php ----

<html>
<head>
</head>
<body>
<?php
 for ($i=0; $i<50; $i++) {
   echo '<img src="sample.php?'.$i.'"><br>'."\n"; 
 }
?>
</body>
</html>


-- end of reproduce.php ---


Both files are in one directory. Calling reproduce.php will bring up the error.
 [2003-09-10 18:37 UTC] pajoye@php.net
This is a problem related to the freetype lib. Already reported here. We cannot fix this issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 10 11:01:35 2024 UTC