Running: php-4.0.6, gd-2.0.1, jpeg-6b, libpng-1.0.10, zlib-1.1.3

And getting this error: \"ImageCreateFromJpeg: No JPEG support in this PHP build\"

I made sure GD is set to use JPEG in the Makefile:

CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG
LIBS=-lgd -lpng -lz -ljpeg -lm

And with PHP I add the following to ./configure:

--with-gd=/usr -with-jpeg-dir=/usr/local --with-png-dir=/usr --with-zlib-dir=/usr

Yet, JPEG functions don\'t work (PNG functions work just fine). What\'s strange is that PHP reports that it finds JPEG support during the ./configure process:

\"checking for gdImageCreateFromJpeg in -lgd... yes\"

yet GD gives no JPEG indicator during the \"make install\" process (not sure if this is normal or not).

Everything is basically standard on my setup and everthing else is working just fine. There\'s only one quirk with my PHP in that phpinfo() reports old \"Configure Commands\" and an older version of mySQL, however newer information in other areas (like the GD/PNG/ZLIB reporting). This happens even after I build PHP by first removing the cache file and doing a cvsclean.

I\'ve wend around and around with this and can\'t figure out what\'s missing. I really need 16 million color jpeg support so gd-2.0.1 is the only version I can use. Am I missing something? Is there some trick? Maybe something to look for to find out where the SNAFU is?

Thanks, Bob.

    • [deleted]

    Did you also install the jpeg libraries?

      Yes, jpeg-6b. There isn't much of a manual on the install instructions for it, but I just ran a ./configure, make, make install I had to tell GD where the jpeg files were because it couldn't find them automatically.

      Bob

        a month later

        I ve had a similar problem...

        do a "make clean" before you ./configure...

        it should work

          4 months later

          After reading your comments, and that of Frank's, and having this exact same problem, I'll share with you what got it to work for me.. (fyi: I'm using Apache 1.3.22, GD 1.8.4, PHP 4.1.1, and MySQL 3.23.42, on a RedHat 7.1 system Kernel 2.4.2)

          First: I assume you have the sources for GD, Apache, and PHP installed relative to eachother in a common tree.. (eg: /usr/src)

          Second: I assume you've installed the appropriate libraries for jpeg, png, freetype, etc.

          Third: I assume Apache, GD and PHP were at once point installed correctly from the sources you have.
          Here's the steps I took..
          1: inside the php source-dir, type 'rm config.cache' then 'make clean'.

          2: Find the png, jpeg, and zlib libraries. On my system png and jpeg are in /usr/lib, and zlib is in /usr/include.

          3: type './configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.22 --enable-track-vars --with-gd=../gd-1.8.4
          --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/include' (of course modifying paths to reflect the versions of the software you have)

          4: If you haven't run ./configure in the apache source-dir yet, do so now, with whatever options you need.

          5: stop apache (apachectl stop)

          6: go back to the PHP source-dir, type 'make', then 'make install'.

          7: go back to the Apache source-dir, type 'make', then 'make install'.
          8: If all goes well, you should get the OK mesage from the apache install script, at which point you should start apache back up (apachectl start), and access a file with only the line '<?phpinfo();?>'.

          9: Look for the section entitled, 'gd', and see if GD/JPEG/PNG support is enabled.

          If not, either you're missing some headers or libraries (check the output of ./configure in both apache and php for any error 2 or error 1's), the path to those libraries is incorrect, or you forgot to do the traditional './configure', 'make', 'make install' in the gd source-dir. 🙂

          Hope this helps maanngg.

          -- Nick

            Write a Reply...