Compiling PHP with JPEG support

There is a bug in the the build process for PHP4/5. If you have already compiled the PHP source without JPEG support and then try to compile it again but with JPEG support, the new setting will get ignored.

Firstly remove the previous build my typing:

make clean

Then run configure again with the following options:

--with-jpeg-dir=<path to jpeg library>

For example if your JPEG library is installed in:

/usr/lib/libjpeg.so

Then you should use:

--with-jpeg-dir=/usr/lib

To check if JPEG support is enabled in your new build use PHP's info option:

php -i

Last updated: 30/07/2006