Fatal error: Uncaught Error

easyhostmedia

Well-known member
Hi All
I have a small issue.
I have now found the time to upload products to me website, but as soon as i add a product image the website throws up this error


Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpeg() in /home/******/public_html/store/system/library/image.php:34 Stack trace: #0 /home/******/public_html/store/system/library/image.php(20): Image->create('/home/******...') #1 /home/******/public_html/store/catalog/model/tool/image.php(42): Image->__construct('/home/******...') #2 /home/******/public_html/store/catalog/controller/product/category.php(148): ModelToolImage->resize('data/products/D...', '700', '300') #3 /home/******/public_html/store/system/engine/front.php(42): ControllerProductCategory->index() #4 /home/******/public_html/store/system/engine/front.php(29): Front->execute(Object(Action)) #5 /home/******/public_html/store/index.php(237): Front->dispatch(Object(Action), Object(Action)) #6 {main} thrown in /home/******/public_html/store/system/library/image.php on line 34
 
Make sure you have GD2 not only installed but also activated in your php.ini

maybe your hosting provider must install it
 
Make sure you have GD2 not only installed but also activated in your php.ini

maybe your hosting provider must install it

this is all i get


login as: root
root@*******'s password:
Last login: Mon Apr 15 12:02:57 2019 from bcp.bsdinn.com
root@******* [~]# yum install php-gd
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 67.205.110.4
* cpanel-addons-production-feed: 67.205.110.4
* cpanel-plugins: 67.205.110.4
* base: mirrors.rit.edu
* extras: mirrors.rit.edu
* updates: mirrors.rit.edu
EA4 | 2.9 kB 00:00
cpanel-addons-production-feed | 2.9 kB 00:00
cpanel-plugins | 2.9 kB 00:00
MariaDB103 | 2.9 kB 00:00
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
vz-base | 951 B 00:00
vz-updates | 951 B 00:00
No package php-gd available.
Error: Nothing to do
root@******* [~]#
 
For PHP7.0 use (php7.1-gd and php7.2-gd are also available):

yum install php7.0-gd

and than restart your webserver.
 
For PHP7.0 use (php7.1-gd and php7.2-gd are also available):

yum install php7.0-gd

and than restart your webserver.

non of these work

root@******* [~]# yum install php7.0-gd
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 67.205.110.4
* cpanel-addons-production-feed: 67.205.110.4
* cpanel-plugins: 67.205.110.4
* base: mirrors.rit.edu
* extras: mirrors.rit.edu
* updates: mirrors.rit.edu
No package php7.0-gd available.
Error: Nothing to do
root@******* [~]#

root@******* [~]# yum install php7.1-gd
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 67.205.110.4
* cpanel-addons-production-feed: 67.205.110.4
* cpanel-plugins: 67.205.110.4
* base: mirrors.rit.edu
* extras: mirrors.rit.edu
* updates: mirrors.rit.edu
No package php7.1-gd available.
Error: Nothing to do
root@******* [~]#


root@******* [~]# yum install php7.2-gd
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 67.205.110.4
* cpanel-addons-production-feed: 67.205.110.4
* cpanel-plugins: 67.205.110.4
* base: mirrors.rit.edu
* extras: mirrors.rit.edu
* updates: mirrors.rit.edu
No package php7.2-gd available.
Error: Nothing to do
root@******* [~]#
 
Assuming it's cPanel, you must search for php-gd "yum search php-gd" You should be getting the results like,

ea-php51-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php52-php-gd.x86_64 : A module for PHP applications for using the gd graphics: library
ea-php53-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php54-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php55-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php56-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php70-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php71-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php72-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library
ea-php73-php-gd.x86_64 : A module for PHP applications for using the gd graphics : library

Install the php-gd extension needed and you should be ready to go.
 
Assuming it's cPanel, you must search for php-gd "yum search php-gd" You should be getting the results like,



Install the php-gd extension needed and you should be ready to go.

the site i have issue with is using PHP 7.2.18

so i used yum install ea-php72-php-gd.x86_64 and got this

root@****** [~]# yum install ea-php72-php-gd.x86_64
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 67.205.110.4
* cpanel-addons-production-feed: 67.205.110.4
* cpanel-plugins: 67.205.110.4
* base: mirrors.rit.edu
* extras: mirrors.rit.edu
* updates: mirrors.rit.edu
Package ea-php72-php-gd-7.2.18-2.2.2.cpanel.x86_64 already installed and latest version
Nothing to do
root@****** [~]#
 
Back
Top