php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29192 Bundled GD library, imagettfbbox error, possibly other functions, found cause
Submitted: 2004-07-15 23:42 UTC Modified: 2004-07-23 06:01 UTC
From: frank at envirge dot com Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 5.0.0 OS: Fedora
Private report: No CVE-ID: None
 [2004-07-15 23:42 UTC] frank at envirge dot com
Description:
------------
I just compiled PHP 5.0.0 release with:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl --with-zlib --with-gd=/usr/local --with-ttf --with-mcrypt --with-mhash --with-mysql --with-curl --without-sqlite --with-pear --enable-bcmath --enable-calendar --enable-gd-native-ttf --enable-soap  --with-freetype-dir=/usr/lib


I tried to run some ttf button making scripts that were funcional on a previous installation of PHP (4.3.x I believe), however in 5.0.0 the images weren't appearing because imagettfbbox() was returning impossibly high and low values for all of the y values on the array elements for the y values of the text box.  I thought the problem might be with the GD library, so I installed PHP and pointed it to my local GD library (I'm running the latest release) as well as my local libjpeg and libpng.  This solved the problem, so I am pretty sure that the cause lies within the GD library bundled with 5.0.0.

Here is my configuration that solved the problem:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl --with-zlib --with-gd=/usr/local --with-ttf --with-mcrypt --with-mhash --with-mysql --with-curl --without-sqlite --with-pear --enable-bcmath --enable-calendar --enable-gd-native-ttf --enable-soap --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr/lib

I would really like to help.  Please let me know how.

Frank




 


Reproduce code:
---------------
I have a better explaination with sources, and results at this link:

http://www.envirge.com/frank/php_bug/

Expected result:
----------------
I have a better explaination with sources, and results at this link:

http://www.envirge.com/frank/php_bug/

Actual result:
--------------
I have a better explaination with sources, and results at this link:

http://www.envirge.com/frank/php_bug/

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-17 14:02 UTC] pajoye@php.net
Cannot reproduce (head and php4). Check that you do not use the external lib header or library. Bogus for now.

--Pierre
 [2004-07-17 17:19 UTC] frank at envirge dot com
Did you try to reproduce it in PHP 4 or 5?  I was running the latest version of PHP 4 and the bug did not appear, but when I switch over to 5.0.0 it became apparent. The only thing that changed between the first configuration of PHP 5.0.0 and my second configuration of PHP 5.0.0 was that in the second configuration I ponted the ./configure script to use my local GD library instead of the bundled GD library.  That then solved the problem.  This leads me to believe that there is an issue in the GD library that is bundled.  If you'd like, I can recompile 5.0.0 to use the bundled library and reproduce the error and put it up on the link where I have the solution and results.  Also, I'm pretty sure this is not just me (or bogus), I just talked to two other friends who just installed 5.0.0 with the bundled library and they had the same results trying to use imagettfbbox().

 Another thing I noticed, this same bug was reported back in 4.3.0 and was apparently fixed.  Here is a link to the bug number:

http://bugs.php.net/bug.php?id=22513  

Frank
 [2004-07-17 17:32 UTC] pajoye@php.net
> Did you try to reproduce it in PHP 4 or 5? 

Yes, HEAD==php5 cvs (which is 5.0 for gd)

Please give a try with the bundled GD. Be sure that you do not have any headers/whatever in your lib/include path before running configure/make.

--Pierre
 [2004-07-23 06:01 UTC] frank at envirge dot com
Hi,
I installed from the CVS and its working.  Thanks very much for your help. 

Frank
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 04:01:30 2024 UTC