Author Topic: How to register imagick extension for php-fpm?  (Read 7103 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to register imagick extension for php-fpm?
« on: June 08, 2021, 08:30:47 AM »
Hello
I installed Imagick on the system but where and how can I register the extension? I can see the package in PECL-Manager but only for Main PHP.
I tried a fresh php-installation with php-fpm (custom config with imagick option ticked) and restarted the services. But the module is still missing in info.php
Bast, Filz

Offline
*
Re: How to register imagick extension for php-fpm?
« Reply #1 on: June 08, 2021, 09:45:34 AM »
When you log in using ssh as root what is the result of this command:
Code: [Select]
/usr/bin/convert –version OR
Code: [Select]
convert –version OR
Code: [Select]
/usr/local/bin/convert –version
Applications Developer | RHEL Linux Server Administrator

Reach out to me in pm to solve any application deployment such as NodeJS, Java, PHP etc


Managed 40gb Shared CWP PRO Hosting for $20 p/a offer
Managed 60gb Shared CWP PRO Hosting for $40 p/a offer
Managed 100gb Shared CWP PRO Hosting for $60 p/a offer
Managed 200gb Shared CWP PRO Hosting for $120 p/a offer


CentOS 8 died a premature death at the end of 2021 - migrate to RockyLinux Os.

Offline
*
Re: How to register imagick extension for php-fpm?
« Reply #2 on: June 09, 2021, 07:08:40 AM »
Hi Joseph

Output from 1st. and 2nd Command:
Code: [Select]
Version: ImageMagick 6.9.10-86 Q16 x86_64 2020-01-13 https://imagemagick.org
Copyright: © 1999-2020 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib cairo fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps raqm raw rsvg tiff webp wmf
 x xml zlib
Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
...

Output from 3rd command:
Code: [Select]
sh: /usr/local/bin/convert: No such file or directory
But output from command
Code: [Select]
php -mis

Code: [Select]
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
redis
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
« Last Edit: June 09, 2021, 07:11:59 AM by filz51 »

Offline
*
Re: How to register imagick extension for php-fpm?
« Reply #3 on: June 10, 2021, 08:59:27 AM »
Its adivsable to install the Imagick PHP Module extension via cwp
Code: [Select]
module=php_selector2

Visit that module and configure options for the specific PHP version you desire then build

Never install anything that CWP offers on the dashboard if you do not know how to revert incase anything breaks. Always keep your installations within the ecosystem of CWP. It is safe and guarantees nothing breaks at the moment and subsequently when you update CWP.
Applications Developer | RHEL Linux Server Administrator

Reach out to me in pm to solve any application deployment such as NodeJS, Java, PHP etc


Managed 40gb Shared CWP PRO Hosting for $20 p/a offer
Managed 60gb Shared CWP PRO Hosting for $40 p/a offer
Managed 100gb Shared CWP PRO Hosting for $60 p/a offer
Managed 200gb Shared CWP PRO Hosting for $120 p/a offer


CentOS 8 died a premature death at the end of 2021 - migrate to RockyLinux Os.

Offline
*
Re: How to register imagick extension for php-fpm?
« Reply #4 on: June 10, 2021, 06:40:06 PM »
Hi

I did. And I did it one more time. Restart. But still, the extension is not showing up in info.php. What can I do?

Offline
*
Re: How to register imagick extension for php-fpm?
« Reply #5 on: June 11, 2021, 08:19:13 AM »
This is the configure command:
Code: [Select]
phpinfo for php-fpm74
phpinfo()
PHP Version => 7.4.20

System => Linux my.system.com 4.18.0-310.el8.x86_64 #1 SMP Tue Jun 8 00:24:50 UTC 2021 x86_64
Build Date => Jun 11 2021 09:11:10
Configure Command =>  './configure'  '--prefix=/opt/alt/php-fpm74/usr' '--with-config-file-path=/opt/alt/php-fpm74/usr/php' '--with-config-file-scan-dir=/opt/alt/php-fpm74/usr/php/php.d' '--with-zlib=/usr' '--enable-mbstring' '--with-zip' '--enable-bcmath' '--enable-pcntl' '--enable-ftp' '--enable-exif' '--enable-calendar' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-tidy' '--with-curl' '--with-iconv' '--with-gmp' '--with-pspell' '--enable-gd' '--with-jpeg' '--with-freetype' '--enable-gd-jis-conv' '--with-webp' '--with-zlib-dir=/usr' '--with-xpm' '--with-openssl' '--with-pdo-mysql=mysqlnd' '--with-gettext=/usr' '--with-bz2=/usr' '--with-mysqli' '--enable-soap' '--enable-phar' '--with-xsl' '--with-xmlrpc' '--with-kerberos' '--enable-posix' '--enable-sockets' '--with-external-pcre' '--with-libdir=lib64' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--enable-intl' '--enable-fpm' '--enable-opcache' 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /opt/alt/php-fpm74/usr/php
Loaded Configuration File => /opt/alt/php-fpm74/usr/php/php.ini
Scan this dir for additional .ini files => /opt/alt/php-fpm74/usr/php/php.d
Additional .ini files parsed => /opt/alt/php-fpm74/usr/php/php.d/apcu.ini,
/opt/alt/php-fpm74/usr/php/php.d/ioncube.ini,
/opt/alt/php-fpm74/usr/php/php.d/memcached.ini,
/opt/alt/php-fpm74/usr/php/php.d/opcache.ini,
/opt/alt/php-fpm74/usr/php/php.d/redis.ini
(...)

shouldn't there be added something like '--enable-imagick' in when I ticked "imagick" it in the options to compile the php-fpm version? 

Offline
*
Re: How to register imagick extension for php-fpm?
« Reply #6 on: June 11, 2021, 12:25:49 PM »
When you open this
Code: [Select]
module=php_switch_v2 do you see imagick option (checkbox)?
Applications Developer | RHEL Linux Server Administrator

Reach out to me in pm to solve any application deployment such as NodeJS, Java, PHP etc


Managed 40gb Shared CWP PRO Hosting for $20 p/a offer
Managed 60gb Shared CWP PRO Hosting for $40 p/a offer
Managed 100gb Shared CWP PRO Hosting for $60 p/a offer
Managed 200gb Shared CWP PRO Hosting for $120 p/a offer


CentOS 8 died a premature death at the end of 2021 - migrate to RockyLinux Os.

Offline
*****
Re: How to register imagick extension for php-fpm?
« Reply #7 on: June 12, 2021, 03:37:50 PM »
php-fpm vesion have option for imagick tick that and build php

Offline
*
Re: How to register imagick extension for php-fpm?
« Reply #8 on: June 13, 2021, 07:17:52 AM »
Code: [Select]
The module is listed now for the web panel info.php but not for the accounts. I found these two lines in the status for php_selector3. Might this be a reason?
Jun 13 09:04:22 my.system.com systemd[1]: php-fpm74.service: Can't open PID file /opt/alt/php-fpm74/usr/var/run/php-fpm.pid (yet?) after reload: No such file or directory
Jun 13 09:04:22 my.system.com systemd[1]: Reloaded The PHP FastCGI Process Manager.