Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CentOS: Enabling GD Support in PHP Installation

How do I go about enabling GD Support in a CentOS Installation?

like image 494
AKKAweb Avatar asked Jan 26 '12 20:01

AKKAweb


People also ask

Which function should be run to watch that GD Support is enabled or not?

To know this we can use phpinfo function and check GD support is available or not.

What is CentOS PHP?

It is server-side scripting. One can write dynamically generated web pages in PHP or embedded PHP directly into HTML. PHP offers built-in database integration for several commercial and non-commercial database management systems. By default, CentOS 7/RHEL 7 comes with PHP version 5.4 only.


2 Answers

The thing that did the trick for me eventually was:

yum install gd gd-devel php-gd 

and then restart apache:

service httpd restart 
like image 110
Nir Alfasi Avatar answered Sep 22 '22 00:09

Nir Alfasi


  1. You need to find a repo that offers a GD lib matching your current php version. I've had great success using Remi Collet's repo for this purpose. In fact, I used it yesterday to update my php install to the latest 5.4.0RC6 version on my CentOS6 box.
  2. Once you've setup the repo it's a simple matter of running sudo yum install php-gd
  3. Of course, the usual things apply: make sure you restart apache after installing, etc.
like image 40
rdlowrey Avatar answered Sep 22 '22 00:09

rdlowrey