I am trying to get GD working with PHP.

I compile php but then go compile apache and get all sorts of errors.

HELP!

I have:
php 4.0.6
apache 1.3.20

GD 1.8.3 I think it is.

I installed zlib too.

THanks!

    can you be more explicit on the errors.
    and where all your external module are installed.

    Gilles

      OK.

      Here is what I did:

      1. download GD and do the make/make install.
      2. Went to php dir and did:
        ./configure --with-mysql=/usr/local/mysql --with-xml --with-apache=../apache_1.3.20 --with-curl=/usr/local/lib --enable-shared-pdflib --enable-track-vars --enable-url-includes --enable-magic-quotes --with-gd=/home/me/gd --with-zlib

      /home/me/gd links to the gd 1.8.3 dir.

      (make/makeinstall)

      1. Hit apache and config as normal then on MAKE get loads of errors like:

      /usr/local/lib/libgd.a(gd_jpeg.o): In function fatal_jpeg_error':
      gd_jpeg.o(.text+0x38): undefined reference to
      jpeg_destroy'
      /usr/local/lib/libgd.a(gd_jpeg.o): In function gdImageJpegCtx':
      gd_jpeg.o(.text+0x13f): undefined reference to
      jpeg_std_error'
      gd_jpeg.o(.text+0x1aa): undefined reference to jpeg_CreateCompress'
      gd_jpeg.o(.text+0x1db): undefined reference to
      jpeg_set_defaults'
      gd_jpeg.o(.text+0x1f2): undefined reference to jpeg_set_quality'
      gd_jpeg.o(.text+0x210): undefined reference to
      jpeg_simple_progression'
      gd_jpeg.o(.text+0x26b): undefined reference to jpeg_destroy_compress'
      gd_jpeg.o(.text+0x28d): undefined reference to
      jpeg_start_compress'
      gd_jpeg.o(.text+0x325): undefined reference to `jpeg_write_marker'

        also wanted to say that I tried just --with-gd too, without dir.

        Any help is appreciated. 2 days on this and no luck

          I checked my rpm packages on webmin and it says GD,zlib and libpng are there.

            your GD is expecting jpeg.

            Try to configure PHP with --with-jpeg-dir option set.

              did that before.

              I will try again though.

              Before I did
              --with-jpeg-dir
              --with-png-dir

                Well, I knew the problem was not my not knowing.

                What I did:

                Went into webadmin and ripped out the GD stuff that was there. Turns out there was a php rpm in there too that was dependant on it.

                I never installed this php via rpm (yuk). I assume the initial tech did. So I ripped that out.

                rpm -i GD.rpm

                then redid it all and presto. No errors and this script that uses GD works.

                Thanks for confirming that I was doing things right. It lead me to snooping which = solution 🙂

                Thanks

                  Write a Reply...