A
A
Anton Shelestov2020-05-16 13:32:08
PHP
Anton Shelestov, 2020-05-16 13:32:08

How to include GD library?

Hello!

Moved the site to a VPS, but image generation does not work there
Gives an error GD Library extension not available with this PHP installation

Read the topic How to enable the GD module in PHP? but something didn’t really understand what they wrote there (

in phpinfo (); GD is not present
php -m shows that gd is

They write something about what you need to configure php7.4 with the --enable-gd parameter
( https:/ /www.php.net/manual/ru/image.installation.php)
But again, I still don’t understand how to do it.

Guys, I need advice on where to dig to make everything work)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shelestov, 2020-05-16
@ShelestovAnt

Problem solved!
Reason: "Inattention like a programmer"
In the console, the version is php 7.4, and in apache I worked with 7.2
Commands:

sudo a2dismod php7.2
sudo a2enmod php7.4
sudo systemctl restart apache2

we switch and rejoice
. I'll leave it here just in case, it can be useful to someone.
Thanks everyone for the help!

V
Vladimir Korotenko, 2020-05-16
@firedragon

Try this, recompiling is a bad idea
sudo apt install php7.4-gd

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question