I am new to php-fpm
We are using PHP with Apache 2.4. After switching from php7_module to proxy_fcgi_module the gd extension is not found anymore. How can I make sure that it is used?
Problem for Kanboard
The error message goes like Internal Error: This PHP extension is required: "gd"
.
Some Versions and Configurations
- OS: CentOS 7 (I know, we want to upgrade this year :) )
Packages
sudo yum list installed | grep php
php.x86_64 7.2.29-1.el7.remi @remi-php72
php-cli.x86_64 7.2.29-1.el7.remi @remi-php72
php-common.x86_64 7.2.29-1.el7.remi @remi-php72
php-gd.x86_64 7.2.29-1.el7.remi @remi-php72
php-json.x86_64 7.2.29-1.el7.remi @remi-php72
php72-php-common.x86_64 7.2.34-10.el7.remi @remi-safe
php72-php-fpm.x86_64 7.2.34-10.el7.remi @remi-safe
php72-php-json.x86_64 7.2.34-10.el7.remi @remi-safe
php72-php-mysqlnd.x86_64 7.2.34-10.el7.remi @remi-safe
php72-php-pdo.x86_64 7.2.34-10.el7.remi @remi-safe
# ...
php -i
phpinfo()
PHP Version => 7.2.29
System => Linux # ...
Build Date => Mar 17 2020 11:36:09
Loaded Configuration File => /etc/php.ini
Additional .ini files parsed => /etc/php.d/10-opcache.ini,
/etc/php.d/20-bz2.ini,
# ...
/etc/php.d/20-gd.ini,
Config Files
$ find / -name "php\.ini" -type f
# /etc/opt/remi/php72/php.ini
# /etc/php.ini
$ find / -name "www\.conf" -type f
/etc/opt/remi/php72/php-fpm.d/www.conf
$ cat /usr/lib/systemd/system/php72-php-fpm.service
# It's not recommended to modify this file in-place, because it
# will be overwritten during upgrades. If you want to customize,
# the best way is to use the "systemctl edit" command.
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=notify
EnvironmentFile=/etc/opt/remi/php72/sysconfig/php-fpm
ExecStart=/opt/remi/php72/root/usr/sbin/php-fpm --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
# GD ini:
$ cat /etc/php.d/20-gd.ini
; Enable gd extension module
extension=gd
As far as I can understand this, we have all needed packages, PHP actually uses PD-extension, but php-fpm does not. There are also two different php.ini
files. How can I fix this? Do I need to install a different version of php-fpm
?
Finally: is it possible having two PHP installations running at all?