I'm trying to compile PHP 4.2.3 on Apache2 with GD support. I have libpng, libjpeg, libgd and zlib all compiled and installed, and am compiling with the following options;
./configure --with-mysql --with-gd
--with-apxs2=/usr/local/apache2/bin/apxs
--with-jpeg-dir=/usr/lib/
--with-png-dir=/usr/lib/
--with-zlib-dir=/usr/lib/
It compiles fine, and when I run the sample script given in the PHP manual website it executes up to the line where it calls ImagePNG (I tried imagejpeg too), saying it is an undeclared function.
Fatal error: Call to undefined function: imagejpeg() in
/dir/public_html/test.php on line 7
This tells me that php is detecting gd fine, but for some reason not getting the correct information about it or something. I looked back through the ./configure output for php and these are the relevant lines about GD.
checking for GD support... yes
checking whether to enable truetype string function in GD... no
checking for the location of libjpeg... yes
checking for jpeg_read_header in -ljpeg... (cached) yes
checking for the location of libpng... yes
checking for png_write_image in -lpng... (cached) yes
checking for the location of libXpm... no
If configure fails try --with-xpm-dir=<DIR>
checking for freetype(2)... no
If configure fails try --with-freetype-dir=<DIR>
checking for FreeType 1.x support... no
checking for T1lib support... no
checking for gdImageString16 in -lgd... (cached) yes
checking for gdImagePaletteCopy in -lgd... (cached) yes
checking for gdImageCreateFromPng in -lgd... (cached) no
checking for gdImageCreateFromGif in -lgd... (cached) no
checking for gdImageGif in -lgd... (cached) no
checking for gdImageWBMP in -lgd... (cached) yes
checking for gdImageCreateFromJpeg in -lgd... (cached) no
checking for gdImageCreateFromXpm in -lgd... (cached) yes
checking for gdImageCreateFromGd2 in -lgd... (cached) no
checking for gdImageCreateTrueColor in -lgd... (cached) no
checking for gdImageSetTile in -lgd... (cached) yes
checking for gdImageSetBrush in -lgd... (cached) yes
checking for gdImageStringTTF in -lgd... (cached) yes
checking for gdImageStringFT in -lgd... (cached) yes
checking for gdImageStringFTEx in -lgd... (cached) no
checking for gdImageColorClosestHWB in -lgd... (cached) yes
checking for gdImageColorResolve in -lgd... (cached) yes
checking for gdImageGifCtx in -lgd... (cached) no
checking for GNU gettext support... no
Anyone have any idea what is going on?
(Slackware 8.1 on an athlon 1.2).