#21533 [NEW]: Trouble building PHP w/ GD and including ImageTTFxxx functions
| From: | jeffabruce at hotmail dot com | Date: | Wed, 08 Jan 2003 23:52:16 +0000 |
| Subject: | #21533 [NEW]: Trouble building PHP w/ GD and including ImageTTFxxx functions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-29500@lists.php.net to get a copy of this message | ||
From: jeffabruce@hotmail.com
Operating system: RH 7.2
PHP version: 4.3.0
PHP Bug Type: GD related
Bug description: Trouble building PHP w/ GD and including ImageTTFxxx functions
I had FreeType 1.x installed only, not FreeType 2.x.
Problem #1
After extracting the tarball and running 'configure' (with various
options), the output indicated that I had FreeType 2 support.
Problem #2
So, I built PHP thinking everything was good to go. However, when I tried
to use ImageTTFText(), I got a segmentaion fault.
Looking at the code in gd.c, I noticed that there is a point in
php_imagettftext_common() that looks like:
#if HAVE_GD_STRINGFT
error = gdImageStringFT(...
#elif HAVE_GD_STRINGTTF
error = gdImageStringTTF(...
#endif
...
if ( error ) ...
This code is clearly risky at best since variable 'error' is undefined if
neither HAVE_GD_STRINGFT or HAVE_GD_STRINGTTF is defined.
I solved my issue of not having support for ImageTTFText() by installing
FreeType 2.x. But the long term solution should include addressing these 2
issues.
--
Edit bug report at http://bugs.php.net/?id=21533&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21533&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21533&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21533&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21533&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21533&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21533&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21533&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21533&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21533&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21533&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21533&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21533&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21533&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21533&r=gnused