PHP GD Library

8 posts / 0 new
Last post
#1 Fri, 05/06/2016 - 05:06
cs10

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

Fri, 05/06/2016 - 05:17
bimpact

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

Fri, 05/06/2016 - 06:34
cs10

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

Fri, 05/06/2016 - 07:12
bimpact

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.

Fri, 05/06/2016 - 07:45
cs10

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.

Fri, 05/06/2016 - 13:24
cs10

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

:)

Sun, 07/24/2016 - 17:52
amityweb

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.

Tue, 09/18/2018 - 09:52
rolty

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

Jim Rolt

Topic locked