Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2009
    Posts
    32

    Default PHP GD Library

    Hello friends,
    Anyone can tell me how can I enable or install the GD Library of PHP?
    Thanks all!

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by ronaldoo View Post
    Hello friends,
    Anyone can tell me how can I enable or install the GD Library of PHP?
    Thanks all!
    You will need root access to the server to do this.

    1. Go to WHM -> Software -> EasyApache
    2. proceed through to step 5 of EasyApache
    3. Click on Exhaustive Options List
    4. Check the box for GD
    5. Save & Build.

  3. #3
    Member
    Join Date
    Jun 2009
    Posts
    32

    Default

    Was solved, thank you!

  4. #4
    Member Janak's Avatar
    Join Date
    Jul 2009
    Posts
    71

    Default

    There is also an another way to enable GD.

    You can also do it from SSH. Run easyapache script and then go to Exhaustive Options List and select GD.

  5. #5
    Member
    Join Date
    Jun 2009
    Posts
    32

    Default

    Quote Originally Posted by Janak View Post
    There is also an another way to enable GD.

    You can also do it from SSH. Run easyapache script and then go to Exhaustive Options List and select GD.
    Ok, thanks!

  6. #6
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Thumbs up

    And there is another way ...

    If you want GD to really work 100% ...

    Compile PHP manually!

    (Actually there is reason for this if you are wanting full GD and have all the functions and components actually work correctly)

    Open a phpinfo() screen to get your current ./configure options as you'll need the rest of your options later below as !!!OPTIONS!!!

    Code:
    # yum install coreutils make gcc* glib* libexif libjpeg* libpng* giflib* gd gd-* netpbm Image* freetype*
    # /scripts/checkperlmodules    (might want to do this 2 or three times)
    At this point you should have an updated compile environment along with the main libraries you will need to build a good GD environment.

    Code:
    # cd /usr/local/src
    # wget http://us3.php.net/get/php-5.2.10.tar.bz2/from/us2.php.net/mirror
    # tar jxvf ./php-5.2.10.tar.bz2
    # cd php-5.2.10
    # ./configure --with-zlib --with-zlib-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf --with-ttf --with-exif --with-gd --with-imagick  !!!YOUR OTHER OPTIONS!!!
    
    (Note the order of the options I've shown --- That is important!)
    
    # make
    # make test
    # make install
    Depending on whether you are using DSO or SuPHP based PHP per the rest of your configure options taken from your current PHP installation, you may or may not need to go update httpd.conf or /opt/suphp/etc/suphp.conf.

    Restart your apache server
    Code:
    service httpd restart
    You should now have a well working GD2 system if all went well.

    The pre-requisite yum installer I gave you also asked to install ImageMagick which is another very powerful graphics package that a lot of PHP scripts like to use. There is an optional module you can add to PHP to give you direct ImageMagick functions from within PHP.

    Code:
    # cd /usr/local/src/php-5.2.10/ext
    # wget http://pecl.php.net/get/imagick-2.3.0RC2.tgz
    # tar zxvf ./imagick-2.3.0RC2.tgz
    # mv imagick-2.3.0 imagick
    # cd imagick
    # phpize
    # ./configure 
    # make
    # make test
    # make install
    You should now have a line in your /usr/local/lib/php.ini file to load the extension that looks like the following:

    Code:
    extension=imagick.so
    Alternatively you could do everything up to the "phpize" command above after you unpacked your original php-5.2.10.tar.bz2 archive but before you compiled PHP and then added "--with-imagick" to the end of the original GD configure options when you compiled PHP and you will have the optional ImageMagick support (imagick) add-on module hard compiled directly into PHP itself instead of being loaded as an external extension module.

Similar Threads & Tags
Similar threads

  1. PHP Warning: PHP Startup: Unable to load dynamic library no-debug-non-zts
    By jdilegge in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 12-04-2011, 09:26 AM
  2. GD library and PHP 5 issue?
    By jackbwa in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 10-20-2010, 07:39 PM
  3. How to install php gd library?
    By maizer in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-17-2009, 12:06 AM
  4. PHP GD Library
    By AnthonyCaesar in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-22-2005, 08:18 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube