C
C
Cyril2018-03-07 17:59:20
PHP
Cyril, 2018-03-07 17:59:20

How to enable the GD module in PHP?

Costs php7.2-fpm and nginx.
Mistake:

Fatal error: Uncaught Error: Call to undefined function imagecreatefrompng()

At first, I just installed php7.2-gd, but nothing worked. Then I got into /fpm/php.ini (and then changed it in /cli/php.ini), changed ;extension=gd2 to extension=gd2 and it didn't give me anything after restarting php, and the server as a whole.
php -m shows gd
There is nothing about gd in phpinfo(), only the author of the module.. What should I do?
I noticed this after I uncommented extension=gd2 exactly in /cli/php.ini
m4Aki3yjN4k.jpg
There is a gd.ini file in the mods-available folder, which contains:
extension=gd.so
php_ini_loaded_file () displays /cli/php.ini
php7.2-gd is already the newest version (7.2.3-1+ubuntu17.10.1+deb.sury.org+1).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question