#22513 [NEW]: imagettfbbox() returning bogus array values
| From: | jeremy at nirvani dot net | Date: | Mon, 03 Mar 2003 09:03:27 +0000 |
| Subject: | #22513 [NEW]: imagettfbbox() returning bogus array values | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-34656@lists.php.net to get a copy of this message | ||
From: jeremy at nirvani dot net
Operating system: linux 2.4.19
PHP version: 5CVS-2003-03-03 (dev)
PHP Bug Type: GD related
Bug description: imagettfbbox() returning bogus array values
I have read these two bugs and this does not seem to be related:
17261 http://bugs.php.net/bug.php?id=17261
17192 http://bugs.php.net/bug.php?id=17192
To verify it is not one of the above bugs:
(Notice only a big black box and no text)
http://www.nirvani.org/not_bug_17192_or_17261.php
http://www.nirvani.org/not_bug_17192_or_17261.phps
To be sure, I even went so far as to put the GDFONRPATH in my global
environment. (snip from phpinfo() _ENV["GDFONTPATH"]
/home/httpd/clients/nirvani.org/ )
This shows the problem of the array elements having bogus values:
http://www.nirvani.org/imagettfbbox_bug.php
http://www.nirvani.org/imagettfbbox_bug.phps
A strange oddity, refresh this above page and watch
array[7] change - that should not happen, it should be the
upper left corner, Y position, which IMO should stay the same, no matter
how bogus the data is.
fontfile (for sanity's sake):
http://www.nirvani.org/times.ttf
The array values returned seem to be a bug compared to what is expected
from here:
http://php.net/imagettfbbox
Paste of the output array:
array(8) {
[0]=>
int(5)
[1]=>
int(-1610627808)
[2]=>
int(-1610628216)
[3]=>
int(134958127)
[4]=>
int(136904992)
[5]=>
int(12)
[6]=>
int(-1610628152)
[7]=>
int(1075156968)
}
my configure line:
'./configure' '--disable-cli' '--disable-cgi' '--with-zlib'
'--with-bz2'
'--without-pear' '--with-gd' '--with-ttf' '--with-freetype'
'--enable-gd-native-ttf' '--enable-bcmath'
'--with-thttpd=/usr/src/thttpd-2.21b'
phpinfo():
http://www.nirvani.org/php.html
The same bug seemed to happend yesterday on a previous compile also. I
added --with-ttf and --enable-gd-native-ttf, but that made no difference.
Other GD stuff works. Looks like configure picked up on the bundled GD
(2.0 compatible). It seems like anything GD-font-related does not work,
and so this might be a deeper bug than just in imagettfbbox().
Jeremy
--
Edit bug report at http://bugs.php.net/?id=22513&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22513&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22513&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22513&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22513&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22513&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22513&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22513&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22513&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22513&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22513&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22513&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22513&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22513&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22513&r=gnused