Hello,

I recently converted over from NT/ASP to a RedHat/Ensim system on RackShack.net to use PHP. It's been a steep learning curve but everything works pretty well.

What I need to do is upgrade the GD library from 1.6.2 to 2.0.1 in order to use the newer image resampling functions. PHP 4.0 is already installed as well as zlib 1.1.3

Do I actually have to recompile PHP or is there some way to just copy a newer version of GD to the system and tell PHP to use it (like a .dll)?

Everything works at the moment, I would just like to have higher quality thumbnails generated from pictures uploaded by a client. I am terrified that an attempt to upgrade will screw the whole system up.

Thanks in advance for any help.

Jeff Carver
DinoByte Web Services

    Yes, I got exactly the same problem. I want to use the newer image functions like imagecopyresampled for HQ-resizing but don't know how to update the GD on SuSe Linux 7.x

      Hi!

      hope this helps:

      1. Make sure you have libjpeg and libpng installed
      2. Grab GD-2.0.1. (http://www.boutell.com/gd/http/gd-2.0.1.tar.gz)
      3. tar zxvf gd-2.0.1.tar.gz
      4. cd gd-2.0.1
      5. Edit the Makefile and change the LIBS line to be:
        LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm
      6. make libgd.a (don't need to do a make install)
      7. Now build PHP using these flags:
        --with-apxs (use apxs2 if needed, may need a path)
        --with-mysql (if needed)
        --with-gd=/home/<you>/gd-2.0.1
        --with-freetype-dir=/usr
        --enable-gd-native-ttf (for PHP 4.0.6 leave off trailing 'f')
        --enable-gd-imgstrttf
        --with-jpeg-dir=/usr
        --with-png-dir=/usr
        --with-zlib

      greets,
      finsoft

        Thanks for the info finsoft.

        I bought a Linux book (Mastering Linux, by Arman Danesh) so maybe I can eventually figure it out using what you've provided.

        What I would really like is to find an RPM package. That seems more my speed at the moment.

        I also have an old system at home which now has RedHat 7 on it. I'll try messing with that system first. Now all I need is time!

        Thanks again.

          Write a Reply...