#21533 [Opn->Fbk]: Trouble building PHP w/ GD and including ImageTTFxxx functions

From: Date: Fri, 10 Jan 2003 01:44:36 +0000
Subject: #21533 [Opn->Fbk]: Trouble building PHP w/ GD and including ImageTTFxxx functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29644@lists.php.net to get a copy of this message
ID: 21533 Updated by: iliaa@php.net Reported By: jeffabruce@hotmail.com -Status: Open +Status: Feedback Bug Type: GD related Operating System: RH 7.2 PHP Version: 4.3.0 New Comment: Can you generate a backtrace from the core file and please provide the shortest possible version of the script that can be used to duplicate the crash. Previous Comments: ------------------------------------------------------------------------ [2003-01-09 09:24:09] jeffabruce@hotmail.com I am using the bundled GD library. ------------------------------------------------------------------------ [2003-01-08 21:19:00] iliaa@php.net Are you using bundled or non-bundled GD library? ------------------------------------------------------------------------ [2003-01-08 17:52:16] jeffabruce@hotmail.com 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 this bug report at http://bugs.php.net/?id=21533&edit=1

« previous php.bugs (#29644) next »