|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 21 21:00:01 2025 UTC |
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.