How to compile PHP5.1.6 with gd support

Discussion in 'Programming/Scripts' started by RoyHTF, May 15, 2007.

  1. RoyHTF

    RoyHTF New Member

    Hi all...

    I am currently using fedora 6 and running php5.1.6.. i lately found the need to use GD support, so i downloaded gd-2.0.35RC3 and followed the instructions to install which is as follows. cd to the gd directory and type ./configure --with-gd, done with no errors, then make and lastly make install everything went ok i guess as i didn't see any error messages. The problem is that when i run phpinfo the --without-gd is still there. I really have tried everything but still dont know why --without-gd is still there, even after ./configure --with-gd. Please help me..I do not know wat to do???Any help is appreciated.
  2. Ben

    Ben Active Member Moderator

    What I guess is that you installed the php binary to a different directory as the one that was installed with yum.
    To check this, run
    which php
    and compare the dir with the one defined in the configure parameters.

    Anyway to solve your gd problem, just run

    yum install php-gd

    that should install your gd library.
  3. RoyHTF

    RoyHTF New Member

    Error Message

    When i run 'which php' the directory displayed is /usr/bin/php. But php already came preinstalled with Fedora 6 so i couldnt have installed the php binary to a different directory as the one that was installed with yum as i had no part in that configuration.

    Where should i go to see the configure parameters to compare???What does it mean if it is different???Sorry but im still a newbie using Fedora.

    Also when i run 'yum install php-gd' i get this message
    'Loading "installonlyn" plugin
    Existing lock /var/run/ another copy is running. Aborting.
    Please help.

    Ok this is how i did the php-gd installation.
    1. I downloaded the gd library
    2. unpacked it to a directory called gd-2.0.35RC3 located in /usr/lib/php
    3. cd to the directory above(cd /usr/lib/php/gd-2.0.35RC3),
    once in the directory i run './configure --with-gd', then 'make' and lastly 'make install'
    4. Then it installed the libraries in 'usr/local/lib' and '/usr/local/include'
    I did this as said in the help file that came with the gd download.
    Last edited: May 16, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

    Please make sure that no other yum process is running (if you have a desktop on the system, close all package managers). Afterwards, the error should be gone. If you still get it and are absolutely sure thar no other yum process is running, you can delete the pid file:
    rm -f /var/run/
    Afterwards, run
    yum install php-gd

Share This Page