ID:               34340
 User updated by:  brian at visionn dot com
 Reported By:      brian at visionn dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         GD related
 Operating System: Windows NT
 PHP Version:      5.1.0RC1
 Assigned To:      pajoye
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2005-09-29 11:39:13] [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.

What do you mean by introduce an error? Provide the error script as
well if it is required to reproduce your problem.



------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

[2005-09-02 07:23:28] [EMAIL PROTECTED]

Provide a SHORT reproducing script. You don't need to define any
functions, etc. to test this. (6 lines?)


------------------------------------------------------------------------

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

Reply via email to