php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35221 Warning: imagepstext(): libt1 returned error 11 & 14
Submitted: 2005-11-15 06:23 UTC Modified: 2005-12-01 01:00 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:3 of 4 (75.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: lcalvert at mn dot rr dot com Assigned:
Status: No Feedback Package: GD related
PHP Version: 5CVS, 4CVS (2005-11-17) (snap) OS: FreeBSD 4.5
Private report: No CVE-ID: None
 [2005-11-15 06:23 UTC] lcalvert at mn dot rr dot com
Description:
------------
After a day or so (100plus refreshes) of running this code the following two errors come up quite often

Warning: imagepstext(): libt1 returned error 11 
Warning: imagepstext(): libt1 returned error 14

Reproduce code:
---------------
http://pastebin.com/429956

Actual result:
--------------
After a day or so (100plus refreshes) of running this code the following two errors come up quite often

Warning: imagepstext(): libt1 returned error 11 
Warning: imagepstext(): libt1 returned error 14

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-15 06:33 UTC] lcalvert at mn dot rr dot com
Memory usage on system after restarting apache goes down to 50% usage after refreshing 100 times memory usage goes to 83% and errors start happening.
 [2005-11-17 04:12 UTC] 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.
 [2005-11-17 09:23 UTC] sniper@php.net
One more thing: Are you using Apache2? And if so, which MPM?
 [2005-11-17 17:04 UTC] lcalvert at mn dot rr dot com
Not using apache2
 [2005-11-17 17:59 UTC] sniper@php.net
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-18 04:03 UTC] 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-23 11:22 UTC] sniper@php.net
How about trying to pass the FULL path to new.pfb here:

  $font = imagepsloadfont("fonts/new.pfb"); 


 [2005-12-01 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 19:01:30 2024 UTC