#40946 [Bgs]: Use of newer GD install prevents text functions from working.
| From: | gfrank at neoservers dot com | Date: | Thu, 29 Mar 2007 19:30:38 +0000 |
| Subject: | #40946 [Bgs]: Use of newer GD install prevents text functions from working. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-110940@lists.php.net to get a copy of this message | ||
ID: 40946
User updated by: gfrank at neoservers dot com
Reported By: gfrank at neoservers dot com
Status: Bogus
Bug Type: GD related
Operating System: Linux 2.6.20
PHP Version: 4.4.6
Assigned To: pajoye
New Comment:
We actually did try specifying an absolute path to the font, and it
still wouldn't work. The exact same code, however, worked with the
bundled GD without issue.
The reason we were trying the external GD was due to a string of glibc
errors causing the system to crash, and after a lot of investigating we
had reason to believe that the issue lied within GD as we heavily rely
on it.
Later this week I will recompile PHP back to the alternate config using
the external GD and try your suggestion. If that also produces errors,
would you like me to respond?
Thank you.
Previous Comments:
------------------------------------------------------------------------
[2007-03-29 11:07:32] pajoye@php.net
"I'm not sure if this is an issue with PHP not being compatible with
the newer GD or if this is a bug in GD."
It is not really a bug, not in php neither in GD. Environment like
apache requires an absolute path as the CWD differs. The problem is
solved by PHP internal functions. the php CWD is used by php functions.
Add:
$font = realpath($font);
Question, why do you want to use the external GD? 2.0.34 has not all
new functions and improvements available in the bundled GD (but all bug
fixes). I strongly recommend to use the bundled GD with php.
------------------------------------------------------------------------
[2007-03-29 10:01:08] gfrank at neoservers dot com
Description:
------------
When using the latest stable release of GD 2.0.34 instead of the
bundled version, functions which require text generate an error.
The issue was present on not just the provided code below but on every
single piece of code we had that used ANY function that accessed a font.
It claims the font didn't exist or couldn't be opened. As soon as we
went back to the bundled GD, it started working again.
I'm not sure if this is an issue with PHP not being compatible with the
newer GD or if this is a bug in GD.
Configure String:
./configure --prefix=/usr --libdir=/usr/lib64
--localstatedir=/var/lib/php --with-apxs2=/usr/apache/bin/apxs
--with-zlib-dir=/usr --with-bz2=/usr --enable-calendar
--with-jpeg-dir=/usr --enable-ftp --with-gd=/usr --with-ttf
--with-freetype-dir=/usr --enable-gd-native-ttf
--with-png-dir=/usr --with-gettext=/usr --with-mysql=/usr
--with-curlwrappers --enable-sockets --enable-versioning
--enable-track-vars --enable-trans-sid --enable-bcmath
--enable-mbstring --disable-debug --enable-sysvshm
--enable-sysvsem --enable-shmop
Reproduce code:
---------------
http://www.animeforum.com/jakiao/code.phps
Expected result:
----------------
http://www.tuxeodmask.com/sig/blah.html (the
images beneath "back to
list" and above "Hi Bob")
Actual result:
--------------
PHP Warning: imagettfbbox(): Could not find/open font in
/home/kaitou/tuxedomask.com/sig/sig2.jpg on line 150
Warning: imagettfbbox(): Could not find/open font in
/home/kaitou/tuxedomask.com/sig/sig2.jpg on line 150
PHP Warning: imagettftext(): Could not find/open font in
/home/kaitou/tuxedomask.com/sig/sig2.jpg on line 161
Warning: imagettftext(): Could not find/open font in
/home/kaitou/tuxedomask.com/sig/sig2.jpg on line 161
PHP Warning: imagettftext(): Could not find/open font in
/home/kaitou/tuxedomask.com/sig/sig2.jpg on line 162
Warning: imagettftext(): Could not find/open font in
/home/kaitou/tuxedomask.com/sig/sig2.jpg on line 162
PNG
IHDR l©\V PLTE,m¯ÿÿÿíä++RNS@æØf
IDAc
ÀÍ+][IEND®B
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40946&edit=1