Here is the script:

<?php
$text = urldecode(substr($PATH_INFO,1));

$font = 'handwriting';
if(!$size) $size = 12;
$im = ImageCreateFromPNG('button.png');
$tsize = imagettfbbox($size,0,$font,$text);
$dx = abs($tsize[2]-$tsize[0]);
$dy = abs($tsize[5]-$tsize[3]);
$x = ( imagesx($im) - $dx ) / 2;
$y = ( imagesy($im) - $dy ) / 2 + $dy;
$black = ImageColorAllocate($im,0,0,0);
ImageAlphaBlending($im, true);
ImageTTFText($im, $size, 0, $x, $y, $black, $font, $text);
Header('Content-type: image/png');
ImagePNG($im);
?>

That button.png image is here: http://lerdorf.com/images/button.png
And I have put the handwriting.ttf file at lerdorf.com/handwriting.ttf

I get the RSHUTDOWN crash on about 30% of the hits to that script and the
imagettfbbox() crash very infrequently.

-Rasmus

On Sun, 30 Mar 2003, Ilia A. wrote:

> On March 30, 2003 01:19 pm, Rasmus Lerdorf wrote:
> > I am starting to wonder if we have a basic
> > incompatibility with the current freetype lib.  This is PHP_4_3 on a
> > Debian box with:
> >
> > ii  libfreetype6-dev                          2.1.3+2.1.4rc2-4
> >             FreeType 2 font engine, development files
>
> I use libfreetype.so.6.3.2 and have not encountered such problems, is there a
> way to see the actual PHP script, which causes this crash?
>
> Ilia
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to