nixCraft Poll

Topics

Add PHP GD support on a Linux server with Plesk

Posted by Vivek Gite [Last updated: October 11, 2006]

PHP is one of the popular web programming languages.

The Plesk software package is a commercial web hosting automation software. It allows to setup set up new websites, email accounts, and DNS entries through a web-based interface.

The php gd package contains a dynamic shared object that will add support for using the gd graphics library to PHP. If users are using popular CMS software such as Wordpress, you need GD support.

Adding GD graphic libraries support to php is quite easy job w/o breaking Plesk software.

Red Hat Enterprise Linux

Type following two command as root user:
# up2date php-gd
# /etc/init.d/httpd restart

Cent OS or Fedora Core Linux

Type following two command as root user:
# yum install php-gd
# /etc/init.d/httpd restart

Verify that php gd support loaded

Type any one of the following command:
# php -m | less
# php -m | grep gd

You can also use phpinfo() to verify that php gd loaded and working perfectly.

Now, your web server should up and runing php with GD :)

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Discussion on This Article:

  1. Larry Boehm Says:

    I love you.

    I was about to re-install apache, php, etc..and saw that all I need to do was yum php-gd, then restart apache.

    Did I tell you I love you?
    Thanks

  2. Jeff Hester Says:

    You are a GOD! Thank you for this — I can’t believe it was so friggen easy.

  3. nixcraft Says:

    Jeff,

    Some time small things bugs out badly - php-gd is one of them.

    Appreciate your post.

  4. Hankster Says:

    WOW

    Thats freaking amazing how simple it was. I was for the past 3 hours looking how to Reconfigure php and apache to install gd.

    You are brilliant.

  5. kyaw min htet Says:

    Thanks alot.That amazing command i never known.

  6. AnonymousCoward Says:

    Hi,

    I did a yum install php-gd
    php -m | grep gd shows gd.

    phpinfo() shows GD when from command line, but does NOT when accessed via Apache. any clues ?

  7. vivek Says:

    It should work if you see gd using phpinfo or command line. See error log for more information.

  8. Prashant Says:

    Thanks a ton :)!!!

  9. Sumith Says:

    hi Vivek,

    in my case php-gd is already installed but its not listing in phpinfo.php.
    plz go thru the following out outputs.

    # rpm -qa | grep -i php
    php-cli-5.2.4-1.fc7
    php-gd-5.2.4-1.fc7
    php-mbstring-5.2.4-1.fc7
    php-snmp-5.2.4-1.fc7
    php-5.2.4-1.fc7
    php-dba-5.2.4-1.fc7
    php-ldap-5.2.4-1.fc7
    php-pdo-5.2.4-1.fc7
    php-ncurses-5.2.4-1.fc7
    php-odbc-5.2.4-1.fc7
    php-soap-5.2.4-1.fc7
    php-xmlrpc-5.2.4-1.fc7
    php-pear-MDB2-2.4.1-2.fc7
    php-magickwand-1.0.1-1.fc7
    php-common-5.2.4-1.fc7
    php-bcmath-5.2.4-1.fc7
    php-imap-5.2.4-1.fc7
    php-mysql-5.2.4-1.fc7
    php-pear-1.5.0-3
    php-xml-5.2.4-1.fc7
    php-pear-MDB2-Driver-mysqli-1.4.1-3.fc7

    # php -m | less

    PHP Modules]
    bcmath
    calendar
    ctype
    date
    dom
    filter
    ftp
    hash
    iconv
    imap
    json
    libxml
    mysql
    pcre
    posix
    Reflection
    session
    SimpleXML
    sockets
    SPL
    SQLite
    standard
    tokenizer
    xml
    xmlreader
    xmlwriter
    zlib

    Can help me to fix this issue

    Thanks
    Sumith

  10. Shane Says:

    You are the Man !!!! thanx a lot plus a thousand times!!!!

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.