ID: 34340 Updated by: [EMAIL PROTECTED] Reported By: brian at visionn dot com -Status: Assigned +Status: Bogus Bug Type: GD related Operating System: Windows NT PHP Version: 5.1.0RC1 Assigned To: pajoye New Comment:
Not PHP bug. Please report this to the T1 library author(s). Previous Comments: ------------------------------------------------------------------------ [2005-10-05 21:57:56] [EMAIL PROTECTED] This is propably some threading issue with T1lib.. ------------------------------------------------------------------------ [2005-10-05 21:56:30] brian at visionn dot com New version of test script with <?php ?>: <?php $font = imagepsloadfont("C:\PATH_TO_FONT\font_file.pfb"); $header_img = imagecreate(320, 20); $font_color = imagecolorallocate($header_img, 42, 86, 143); $bg_color = imagecolorallocate($header_img, 255, 255, 255); imagefill($header_img, 0, 0, $bg_color); imagepstext($header_img, "TEXT", $font, 18, $font_color, $bg_color, 0, 16, 0, 0, 0, 16); ?> PATH_TO_FONT\font_file.pfb should be edited to work on the system used. I can't really post on online version, since each time you run the script with an error, it would cause me to have to restart my web server. The easiest way to see the error would be to point the $font variable to a non-existent pfb file, run it, then fix it to point to an existing pfb file. Once the error has occurred, the function no longer works even when the code is correct and the pfb file exists. Once you restart IIS, it works again. ------------------------------------------------------------------------ [2005-09-02 18:55:54] brian at visionn dot com To reproduce, first run the code that work fine. Then introduce an error, run it. Remove the error, run it. The clean code doesn't work until a restart of IIS. There is a comment from 2001 in the docs about this on the imagepstext page...so this might be a T1Lib error that it can't recover from, and so wouldn't belong as a pure PHP bug(?) ------------------------------------------------------------------------ [2005-09-02 18:49:14] brian at visionn dot com apologies, here's a better version of the code with hardcoded values: $font = imagepsloadfont("C:\\PATH_TO_FONT\\font_file.pfb"); $header_img = imagecreate(320, 20); $font_color = imagecolorallocate($header_img, 42, 86, 143); $bg_color = imagecolorallocate($header_img, 255, 255, 255); imagefill($header_img, 0, 0, $bg_color); imagepstext($header_img, "TEXT", $font, 18, $font_color, $bg_color, 0, 16, 0, 0, 0, 16); ------------------------------------------------------------------------ [2005-09-02 17:45:00] brian at visionn dot com The error was fixed by restarting IIS. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34340 -- Edit this bug report at http://bugs.php.net/?id=34340&edit=1