Ben-Miller

Member
Feb 20, 2019
5
0
1
Toronto
cPanel Access Level
Website Owner
Hello,

I've been spending a lot of time trying to add the PHP GD extension to my website, but all of the CPanel guides I see say "Go to step 5 and click Exhaustive Options List to enable it".

Is there an updated guide or method to enable GD on WHM or CPanel?

I have installed PHP GD on my server, and have verified that I have installed the correct PHP GD version for the version of PHP I am using.

I am on CENTOS 7.6, WHM v76.0.20, PHP 7.1.26, and after running PHPinfo() I don't see any GD library even though if I check on my server and it's there: `ea-php71-php-gd-7.1.26-2.2.4.cpanel.x86_64 already installed and latest version`.

Is there anyway to enable GD through WHM or using the terminal?
 

Ben-Miller

Member
Feb 20, 2019
5
0
1
Toronto
cPanel Access Level
Website Owner
Thanks for the reply, yes I am on EasyApache 4. However, I am looking for where this option to enable GD was moved to? I can't find it anywhere in EasyApache 4 and am wondering if enabling PHP GD is still possible in EasyApache 4
 

Ben-Miller

Member
Feb 20, 2019
5
0
1
Toronto
cPanel Access Level
Website Owner
Is it possible that I have it disabled somehow?

I'm trying to run a flatfile CMS on my server and am continually getting: "Fatal error: GD lib (PHP extension) is required for xyz to run." And am also not seeing GD in PHPinfo().

Is there any way to verify that my PHP instance on my server has GD enabled?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
HI @Ben-Miller


1. If it is enabled for the PHP version you're running it should be showing up in the phpinfo page if you need specific configuration settings . On my test server it looks as follows when it's enabled:

Code:
gd
GD Support    enabled
GD Version    bundled (2.1.0 compatible)
FreeType Support    enabled
FreeType Linkage    with freetype
FreeType Version    2.4.11
GIF Read Support    enabled
GIF Create Support    enabled
JPEG Support    enabled
libJPEG Version    6b
PNG Support    enabled
libPNG Version    1.5.13
WBMP Support    enabled
XPM Support    enabled
libXpm Version    30411
XBM Support    enabled
WebP Support    enabled
Directive    Local Value    Master Value
gd.jpeg_ignore_warning    1    1
2. Do you have any specific .ini or .htaccess configurations regarding GD?
 

Ben-Miller

Member
Feb 20, 2019
5
0
1
Toronto
cPanel Access Level
Website Owner
1. Yes this is what I was expecting, that it would show up in PHPinfo if it's installed but it isn't, which is odd to me.
I run:
`rpm -qa | grep gd`
and see that I have
`ea-php71-php-gd-7.1.26-2.2.5.cpanel.x86_64` installed, which seems correct to me?

`php --version`
`
PHP 7.1.26 (cli) (built: Feb 18 2019 19:48:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies`

So it appears that I have the correct php-gd installed but again, it's not showing up in PHPinfo, and I'm unable to use it.

2. I haven't set up any specific configurations regarding GD, but is there a way that I would be able to check if there was something there? What sort of thing would I look for that might potential be blocking me from accessing it?

Thanks for your help! Have been frustrated about this for a while and not sure what else to try
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hi @Ben-Miller


That is interesting, really this should be a pretty easy process to install them both. Ultimately it should be showing up in the phpinfo page unless you'd explicitly disabled it which I'd assume you'd remember if you'd done.

  • Are you running anything such as CloudLinux's PHP Selector?
  • What's *in* your .htaccess for that site?
  • What is noted as the specified php version for the site at WHM>>Software>>MultiPHP Manager
 

Ben-Miller

Member
Feb 20, 2019
5
0
1
Toronto
cPanel Access Level
Website Owner
  • Are you running anything such as CloudLinux's PHP Selector?
  • What's *in* your .htaccess for that site?
  • What is noted as the specified php version for the site at WHM>>Software>>MultiPHP Manager

1. Yes, I'm running the PHP selector but I'm being asked to upgrade to the cloud Linux selector, I unfortunately have multiple versions of PHP installed, but I've tried switching to different PHP version which supposedly have GD installed (and should by default) but no dice.

2. .htaccess file contents:
"""
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php71” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php71 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
"""
Is there anything fishy in there? Or anything I can add to it to allow php-gd?

3. System PHP Version: PHP 7.1 (ea-php71)
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
1. Yes, I'm running the PHP selector but I'm being asked to upgrade to the cloud Linux selector, I unfortunately have multiple versions of PHP installed, but I've tried switching to different PHP version which supposedly have GD installed (and should by default) but no dice.
I think it sounds like you're running MultiPHP not CloudLinux's PHP Selector. Are you using CloudLinux right now?

My train of thought here was that if you're using CloudLinux+ their PHP selector it's possible you need the alt php version of gd but if you're not it shouldn't be an issue

Nothing in the .htaccess or otherwise is suggesting an issue either.

Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!