I've just pulled an all-nighter and have thus been working for the past 20 hours on this seemingly simple problem. Basically, I have been trying upgrade an existing installation of Apache and PHP to the latest. In order to get mysql and gd (with jpeg) support into PHP I did the following:
Supporting software
-----------------------------
Added /usr/local/lib to /etc/ld.so.conf
Ran /sbin/ldconfig
Downloaded, untarred and built latest release version of libpng.
http://www.libpng.org/pub/png/
Downloaded, untarred and built latest release version of zlib.
http://www.info-zip.org/pub/infozip/zlib/
Used ./configure --enable-shared
Downloaded, untarred and built latest release version of JPEG library.
http://www.ijg.org/
Used ./configure --enable-shared
Downloaded, untarred and built latest release version of gd (1.8.4).
http://www.boutell.com/gd/
Altered Makefile to add jpeg support
Verified jpeg support:
> nm libgd.a | grep GD_JPEG_VERSION
00000004 r GD_JPEG_VERSION
PHP and Apache
-----------------------------
Downloaded and untarred latest release version of apache (1.3.19).
http://www.apache.org/
Downloaded and untarred latest release version of php (4.0.5).
http://www.php.net/
In PHP directory:
./configure --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-apache=../apache_1.3.19/ --with-mysql --enable-track-vars
make
make install
In Apache directory:
./configure --enable-shared=max --enable-module=most --with-layout=Apache --activate-module=src/modules/php4/libphp4.a --activate-module=src/modules/standard/mod_so.o
make
make install
Deleted old /usr/sbin/httpd, replaced with hard link to /usr/local/apache/bin/httpd
------------
Whew. Now apache works fine and mysql works fine, but gd does not have JPEG support as witnessed through the missing line in phpinfo(). I am spent, I cannot think of any reason why this shouldn't work, and I can't find anything on the web to help me. Someone please help, I will be eternally grateful.