ID:               21533
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         GD related
 Operating System: RH 7.2
 PHP Version:      4.3.0
 New Comment:

Are you using bundled or non-bundled GD library?


Previous Comments:
------------------------------------------------------------------------

[2003-01-08 17:52:16] [EMAIL PROTECTED]

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

Reply via email to