[quote:723a45f6d4][i:723a45f6d4]Originally posted by Gellpak[/i:723a45f6d4]
Haven't tried. My admin told me that he'd only try if I could get uninstall instructions for the current one and install instructions for the new one.[/quote:723a45f6d4]
I'd say that would create a lot of mess. I'll show you what I did when I needed to recompile PHP with GD 2 exactly for the same reasons that you now have.
Just like IMAP you don't need to install the new GD on the server to get PHP to include it in its DSO module. All you need is show PHP the compiled GD binary and it will build it from there. So here we go:
1. Grab GD-2.0.1 from here: http://www.boutell.com/gd
2. tar zxvf gd-2.0.1.tar.gz
3. cd gd-2.0.1
4. Edit the Makefile and change the LIBS line to be:
LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm
5. make libgd.a (don't need to do a make install)
6. Now build PHP using these flags (in addition to others):
--with-gd=/path/to/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/local
--with-png-dir=/usr/local
--with-zlib
Restart apache once you've finished recompiling PHP and all your GD blues will come to an end.
[i:723a45f6d4]Edited: [/i:723a45f6d4]In these steps I've assumed that you are the server admin. If you are not, then simply send these to whoever is technically responsible for your server.