Bug #51315 [Opn]: imagettftext randomly don't work
From: administrateur at exinsidephp dot com Date: Fri, 19 Mar 2010 15:26:47 +0000 Subject: Bug #51315 [Opn]: imagettftext randomly don't work References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-148773@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51315&edit=1
ID: 51315
User updated by: administrateur at exinsidephp dot com
Reported by: administrateur at exinsidephp dot com
-Summary: imagettfbbox randomly don't work
+Summary: imagettftext randomly don't work
Status: Open
Type: Bug
Package: GD related
Operating System: Debian GNU/Linux 5.0
PHP Version: 5.3.2
New Comment:
Change title of bug
Previous Comments:
------------------------------------------------------------------------
[2010-03-17 20:55:28] administrateur at exinsidephp dot com
Description:
------------
Hi,
I have ugraded PHP 5.2 to PHP 5.3.2 on my Debian server and I have found
a bug width ths function imagettfbbox.
Sometimes the text don't show on the image generated :
http://www.exinsidephp.com/cache/example.png
If I refresh the page (Ctrl+F5) another image don't display the text :
http://www.exinsidephp.com/cache/example2.png
Any error on PHP Blog, any error on syslog or kernel log... I haven't
find any trace of error. Someone have the same issue ?
The PHP Package come from http://www.dotdeb.org/ website. The
list of
modules installed (dpkg -l | grep php5) :
ii libapache2-mod-php5 5.3.2-0.dotdeb.1
ii php5 5.3.2-0.dotdeb.1
ii php5-cli 5.3.2-0.dotdeb.1
ii php5-common 5.3.2-0.dotdeb.1
ii php5-curl 5.3.2-0.dotdeb.1
ii php5-dev 5.3.2-0.dotdeb.1
ii php5-gd 5.3.2-0.dotdeb.1
ii php5-geoip 5.3.2-0.dotdeb.1
ii php5-imagick 5.3.2-0.dotdeb.1
ii php5-imap 5.3.2-0.dotdeb.1
ii php5-mcrypt 5.3.2-0.dotdeb.1
ii php5-mysql 5.3.2-0.dotdeb.1
ii php5-suhosin 5.3.2-0.dotdeb.1
ii php5-xcache 5.3.2-0.dotdeb.1
Test script:
---------------
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Content-Type: image/png');
$image = imagecreate(55,15);
imagecolorallocate($image, 0,0,0);
if($get->getValue('temp2'))
$texte =
$get->getValue('temp1').'/'.$get->getValue('temp2').'
°C';
else
$texte = $get->getValue('temp1').' °C';
$tab =
imagettfbbox(8,0,Config::getCons('PATH_CACHE').'font/verdana.TTF',
$texte);
$text_x = (55-($tab[2]-$tab[6]))/2;
$text_y = (15-($tab[1]-$tab[5]))/2+9;
//$color = imagecolorallocate($image, 2,119,186);
$color = imagecolorallocate($image, 255,255,255);
imagettftext($image,8,0,$text_x,$text_y,$color,Config::getCons('PATH_CACHE').'font/verdana.TTF',$texte);
imagepng($image);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51315&edit=1
Thread (16 messages)
- Bug #51315 [Opn]: imagettftext randomly don't work
- Bug #51315 [Opn]: imagettftext randomly don't work
- Bug #51315 [Opn]: imagettfbbox randomly don't work
- Bug #51315 [Opn]: imagettfbbox randomly don't work
- Bug #51315 [Opn->Asn]: imagettfbbox randomly don't work
- Bug #51315 [Asn]: imagettfbbox randomly don't work
- Bug #51315 [Asn]: imagettfbbox randomly don't work
- Bug #51315 [Asn]: imagettfbbox randomly don't work
- Bug #51315 [Com]: imagettfbbox randomly don't work
- Bug #51315 [Asn]: imagettfbbox randomly don't work
- Bug #51315 [Com]: imagettfbbox randomly don't work
- Bug #51315 [Com]: imagettfbbox randomly don't work
- Bug #51315 [Com]: imagettfbbox randomly don't work
- Bug #51315 [Asn->Fbk]: imagettfbbox randomly don't work
- Bug #51315 [Fbk->NoF]: imagettfbbox randomly don't work
| « previous | php.bugs (#148773) | next » |
|---|