ID: 35221 Updated by: [EMAIL PROTECTED] Reported By: lcalvert at mn dot rr dot com -Status: Open +Status: Feedback Bug Type: GD related Operating System: FreeBSD 4.5 PHP Version: 5CVS, 4CVS (2005-11-17) (snap) New Comment:
How about trying to pass the FULL path to new.pfb here: $font = imagepsloadfont("fonts/new.pfb"); Previous Comments: ------------------------------------------------------------------------ [2005-11-18 04:03:28] lcalvert at mn dot rr dot com <?php session_start(); $alphanum = "ACDEFGHJKLMNPQRSTUVWXYZ346789abcdefghijkmnopqrtuvwxy"; $rand = substr(str_shuffle($alphanum), 0, 5); $width=100; $height=40; $font = imagepsloadfont("fonts/new.pfb"); $im = @imagecreate ($width,$height); $background_color = imagecolorallocate ($im, 53, 12, 28); $text_color = imagecolorallocate ($im, rand(200,255),rand(200,255),rand(200,255)); // Random Text $r=0.20;$g=0.60;$b=0.20; for ($i=1;$i<=3;$i++) { $value=rand(200, 255); $randomcolor = imagecolorallocate ($im , $value*$r, $value*$g,$value*$b); imagefilledellipse($im,rand(0,$width-10),rand(0,$height-3),rand(20,70),rand(20,70),$randomcolor); } imagerectangle($im,0,0,$width-1,$height-1,$text_color); imagepstext($im, $rand, $font, 32, $text_color, $black, 12, 28); imagepsfreefont($font); $rand = strtolower($rand); $_SESSION['image_random_value'] = md5($rand); header("Pragma: no-cache"); header('Content-type: image/jpeg'); imagejpeg($im,'',100); imagedestroy($im); ?> ------------------------------------------------------------------------ [2005-11-17 17:59:03] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. (the pastebin url does not show any code) ------------------------------------------------------------------------ [2005-11-17 17:04:07] lcalvert at mn dot rr dot com Not using apache2 ------------------------------------------------------------------------ [2005-11-17 09:23:20] [EMAIL PROTECTED] One more thing: Are you using Apache2? And if so, which MPM? ------------------------------------------------------------------------ [2005-11-17 04:12:13] lcalvert at mn dot rr dot com Upgraded to PHP Version 5.1.0RC5-dev Warning: imagepstext() [function.imagepstext]: T1Lib Error: Font ID Invalid in this Context in /usr/home/GuestBook/randomImage.php on line 35 Line 35 imagepstext($im, $rand, $font, 32, $text_color, $black, 12, 28); Same problem after refreshing the script for about 20mins the above error message would come up quite frequently. ------------------------------------------------------------------------ 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/35221 -- Edit this bug report at http://bugs.php.net/?id=35221&edit=1