GD Library

Abdul Salam abdul at
Tue May 6 14:48:08 BST 2003


Things are getting more and more wiered. I have only one installation of
Apache/php on my machine. I have this line on my httpd.conf

LoadModule php4_module /usr/local/www/modules/

Which make sure that the loaded module is definitely in the right
directory. The ldd output I sent you earlier is run against this file,
which says it is linked to gd2. So, where is the missing link. My
browser is not cached as I am getting the latest "./configure" string in
phpinfo(). And because of the older version of GD Library I am getting
errors in my programs too (Like Fatal error: Call to undefined function:
imagecreatetruecolor() in /usr/home/xxx/www/classes/thumbnailer.php on
line 66). Any suggestions will be appreciated.



-----Original Message-----
From: Matthew Seaman [mailto:m.seaman at] 
Sent: 06 May 2003 01:53
To: Abdul Salam
Cc: freebsd-users at
Subject: Re: GD Library

On Tue, May 06, 2003 at 12:43:24PM +0100, Abdul Salam wrote:

> Thanks once again. ldd command was new to me and it is a really useful
> one. But, I still couldn't solve the issue. Here is the output of my
> command
> ./
> =>
> /usr/local/lib/mysql/ (0x28259000)
> => /usr/local/lib/ (0x28277000)
> => /usr/lib/ (0x282c4000)
> => /usr/lib/ (0x282dd000)
> => /usr/lib/ (0x2806c000)
> => /usr/lib/ (0x282fa000)
> => /usr/local/lib/ (0x28308000)
> => /usr/local/lib/ (0x2832d000)
> => /usr/local/lib/ (0x2834a000)
> => /usr/X11R6/lib/ (0x28399000)
> => /usr/X11R6/lib/ (0x283a7000)

Good --- you've definitely got PHP linked against GD2.
> which clearly says gd is linked to (viz. GD2.x). But,
> phpinfo() and gd_info() commands of php shows the installed version is
> 1.6.2. Here is my gd_info() output 
> array(9) { 
> ["GD Version"]=> string(15) "1.6.2 or higher" 
> ["FreeType Support"]=> bool(false) 
> ["T1Lib Support"]=> bool(false) 
> ["GIF Read Support"]=> bool(true) 
> ["GIF Create Support"]=> bool(false) 
> ["JPG Support"]=> bool(true) 
> ["PNG Support"]=> bool(true) 
> ["WBMP Support"]=> bool(true) 
> ["XBM Support"]=> bool(false) 
> }
> Which says the installed version is 1.6.2. I have installed GD from
> ports collection and php manually (To get the latest version 4.3.1). I
> don't know whether this makes any difference. Now, I have re-linked my
> to Still the issue remains same.

Hmmm... I definitely get "2.0 or higher" with PHP 4.3.1 and GD2.
Unless your browser is somehow caching the output of a previous run of
gd_info() or you've somehow updated one PHP/apache installation and
then managed to run gd_info() against a different one.  Stranger
things have happened.  If it isn't that, then I guess the difference
must be to do with the PHP version.

By the way, you should update your ports tree: PHP 4.3.1 (as the
www/mod_php4 port) has been in ports for 2 months now.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Mail and any attachments checked for known 
viruses by Netsite Anti-Virus System.
If you have any comments regarding this policy 
please direct them to postmaster at

More information about the Ukfreebsd mailing list