PHP GD Library

Hi All,

I have installed PHP 5.6 on my CentOS 7 virtualmin installatation using the instructions here https://www.virtualmin.com/documentation/web/multiplephp.

I have installed a plugin on my wordpress site on this server, and it says it needs the GD library to work.

How can I enable this please?

Many thanks,
Craig

https://www.virtualmin.com/node/10182 - try this link as I believe it may help you.

Thanks, I did give that a go.

I ran sudo yum install php5-gd, it said already installed and latest version.

I then ran sudo yum install php5.6-gd, it says No package available.

In website options, I can see that against PHP5, GD is available, but not 5.6, which is what I’;m using for this site.

Any advice?

Thanks,
Craig

Craig - let me see if I can find the resource that I used. I thought that was it.

https://ma.ttias.be/install-gd-library-for-php5-on-centos/

This is what I used and it worked. The issue I had was I forgot to restart Apache.

Thanks for that.
I found that too.
Grep shows I have GD for version php5.4.16, but not version 5.6, which is what the virtual server is set to run.

I’ve tried yum install php-gd, yum install php56-gd…

They both don’t work. One says it is already installed, the other says No package php56-gd available.

Sussed it out, if anyone else needs to do it, this is what I ran:

sudo yum install rh-php56-php-gd

And then restarted apache after it had done with:

sudo service httpd restart

:slight_smile:

Brilliant. This worked for me too.

I have always found the installation of a second PHP version problematic due to installing extras like GD, or in the past mycrypt. When you follow normal commands on the server it thinks its for the primary PHP version. I always struggle to find the correct commands/packages for the second PHP version.

I think Virtualmin documention should be updated to help more with installing packages for the second PHP versions.

This the the correct solution. I would never have found it elsewhere, nice one!