Control Web Panel
WebPanel => Updates => Topic started by: eyong on September 02, 2024, 08:22:08 PM
-
Hello people!
I have this error on my CWP, how I can update it?
PHP Warning: Version warning: Imagick was compiled against ImageMagick version 1692 but version 1693 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0
Thank you so much!
-
Try to update ImageMagick using:
(for centos-8, almalinux-8/9, rockylinux-8/9)
dnf update ImageMagick
In case you use older OS (Centos-6/7, etc) then most likely you need to recompile ImageMagick manually.
-
hello,
we are also seeing that the error
Warning: Version warning: Imagick was compiled against ImageMagick version 1692 but version 1693 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0
dnf update ImageMagick
wont fix.
In our case we also see that prestashop stop working as it should ie: combinations and cart arenn't working as should be.
Any idea why imagick comes with this problem and how to solve?
-
On some systems, using dnf to remove & install and rebuilding PHP fixes the problem.
But doesn't seem 100%.
-
Then try to recompile imagick manually. Follow the steps listed bellow:
cd /usr/local/src/
wget https://pecl.php.net/get/imagick-3.7.0.tgz
tar -xvzf imagick-3.7.0.tgz
cd imagick*
/opt/alt/phpXX/usr/bin/phpize
./configure --with-php-config=/opt/alt/phpXX/usr/bin/php-config
make
make install
Make sure to replace "phpXX" with path to the correct php version.
-
@cyberspace
Tried what you listed, but when you do
cd imagick*
The server gives:
-bash: cd: too many arguments
So I did:
cd imagick-3.7.0
But there is no directory there called /opt/alt/phpXX/usr/bin/phpize
-bash: cd: /opt/alt/phpXX/usr/bin/phpize: No such file or directory
The pecl script when I try:
sudo pecl uninstall imagick && sudo pecl install imagick
Asks for:
Please provide the prefix of ImageMagick installation [autodetect] :
I just hit Enter for autodetect, and it installs Imagick 3.7.0, but PHP still isn't seeing it.
Would really like to get this bug resolved once & for all.
-
Too literal?
[root@srv1 overseer]# ls -al /opt/alt/php*/usr/bin/php-config
-rwxr-xr-x. 1 root root 3530 Mar 30 2021 /opt/alt/php-fpm56/usr/bin/php-config
-rwxr-xr-x 1 root root 3763 Dec 1 2022 /opt/alt/php-fpm74/usr/bin/php-config
-rwxr-xr-x 1 root root 3883 Nov 22 03:50 /opt/alt/php-fpm81/usr/bin/php-config
-
Maybe that's the problem.
Not using PHP-FPM, using PHP Selector for PHP-CGI.
But it a config option, so you would think it would work. :/
-
-bash: cd: too many arguments
it seems you have two or more folders called like "imagick-something". That is why you get the error when run "cd imagick*"
-bash: cd: /opt/alt/phpXX/usr/bin/phpize: No such file or directory
overseer right. You just need to specify the correct location of php-config. Each php version has own "php-config". So if you want to build imagick for php 5.6 then run:
./configure --with-php-config=/opt/alt/php56/usr/bin/php-config
for php 7.1:
./configure --with-php-config=/opt/alt/php71/usr/bin/php-config
etc, but for main php version:
./configure --with-php-config=/usr/local/bin/php-config
-
Still no joy.
Ran:
phpize ./configure --with-php-config=/usr/local/bin/php-config
Configuring for:
PHP Api Version: 20230831
Zend Module Api No: 20230831
Zend Extension Api No: 420230831
But then
php -v
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.3.14 (cli) (built: Dec 1 2024 17:10:45) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.14, Copyright (c) Zend Technologies
-
Don't you get errors when you run `make` `make install` ?
If no errors then run:
ls `php -i| grep "^extension_dir" |awk '{print $5}'`/imagick.so
You should get something like:
/usr/local/lib/php/extensions/no-debug-non-zts-xxxxxxxxx/imagick.so
if you get:
"No such file or directory"
then make sure all previous steps (see my first post in this thread) are completed without errors.
In other case run:
php --ini
and check every file listed in output to make sure the path to imagick.so is specified correctly. There is just one record associated with imagick.so.
-
Ran:
phpize ./configure --with-php-config=/usr/local/bin/php-config
phpize and configure are two separate commands:
phpize
./configure --with-php-config=/usr/local/bin/php-config
-
Once I did those 2 commands separate it worked.
Now to see if it stays when PHP gets updated next time.
Thanks for your help @cyberspace