Thread: gd-1.8.3 + PHP

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Chicago, IL USA
    Posts
    48
    Rep Power
    17
    I'm trying to compile php with gd support, but when i use gd functions i.e (imagecreate() . PHP says it isn't a valid function...

    I'm compiling PHP with the following ..

    [root@nano php-4.0.0]# ./configure --with-mysql=/usr/local/mysql
    > --with-xml
    > --with-apache=../apache_1.3.12
    > --enable-track-vars
    > --with-gd=../gd-1.8.3
    > --with-jpeg-dir=/usr/lib
    > --with-zlib=/usr/include
    > --enable-ftp

    the output is...

    checking whether to include GD support... yes (static)
    checking for gdImageString16 in -lgd... (cached) no
    checking for compress in -lz... (cached) yes
    checking for png_info_init in -lpng... (cached) no
    checking for gdImageColorResolve in -lgd... (cached) yes
    checking for gdImageCreateFromPng in -lgd... (cached) no
    checking for gdImageCreateFromGif in -lgd... (cached) no
    checking for libjpeg (needed by gd-1.8+)... yes
    checking for jpeg_read_header in -ljpeg... (cached) yes
    checking for gdImageCreateFromJpeg in -lgd... (cached) no
    checking whether to include ttf support... no

    ...when i compile gd i'm enabling jpeg support and it seems to compile find in /gd-1.8.3. I'm not quite sure what the ./configure output means, all I know is that the functions don't seem to be working. I'm trying to follow the phpbuilder.com tutorial on graphing with php and gd. could someone please help?
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    61
    What does your gd Makefile look like?
  4. #3
  5. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    > --with-gd=../gd-1.8.3

    You should have gd installed prior to running the php configure script. If you happened to installed gd, your path is a non-standard path.

    I used --with-gd=/usr/local since my 'gd2copypal' is in /usr/local/bin/gd2copypal and 'libgd.so' is in /usr/local/lib/libgd.so and the PREFIX when I installed gd was "/usr/local".

    In case your gd2copypal is in /usr/local/gd-1.8.3/bin/gd2copypal and libgd.so is in /usr/local/gd-1.8.3/lib/libgd.so, then specify --with-gd=/usr/local/gd-1.8.3 and see what happen.
  6. #4
  7. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    61
    A couple months ago I managed to get PHP, gd1.8.3, and FreeType working on FreeBSD 3.4 and 4.0, but it was a difficult procedure. I posted my exact procedure in the PHP annotated manual, at http://www.php.net/manual/ref.image.php (see the post at the bottom by rick@e-possibility.com).

    I'm not saying this is the only way to install gd with PHP, but it's the only way _I_ could get it to work.

    freebsd, care to review the post and make any alternate suggestions?
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    1
    Rep Power
    0
    i had to dload the gd src & change Makefile line 14 then recompile. add:
    CFLAGS=-O -DHAVE_JPEG -DHAVE_LIBTIFF

    you could also try recompiling libjpeg.

    hope this works it worked for me.

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo