Installing PHP PECL "imagick" fails on PHP 8.3
cPanel Version
116.0.7
Home / Software / Module Installers / PHP PECL
In /root/tmp/pear/imagick/Imagick.stub.php:
Unterminated preprocessor conditions
make: *** [Makefile:196: /root/tmp/pear/imagick/Imagick_arginfo.h] Error 1
ERROR: `make INSTALL_ROOT="/root/tmp/pear/pear-build-rootAsncgZ/install-imagick-3.7.0" install' failed
-
I just ran into this as well. It appears to be a bug in the module that is waiting for the fix to be merged.
https://github.com/Imagick/imagick/pull/6413 -
Thanks for sharing that, CharlesBNCSU!
0 -
Nice Catch, CharlesBNCSU
1 -
Does anyone have a workaround to fix this issue?
0 -
sa3dy - there wouldn't be a workaround available since we're waiting for PHP to resolve the issue.
0 -
cd /usr/src
wget https://codeload.github.com/Imagick/imagick/zip/refs/heads/master
unzip master
rm -fr master
mv imagick-master imagick
cd imagick
/opt/cpanel/ea-php83/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php83/root/usr/bin/php-config
make
make test
make install
echo "extension=imagick.so" >> /opt/cpanel/ea-php83/root/etc/php.d/imagick.ini
service httpd restart
cd ..
rm -fr imagick6 -
Works like a charm, WJNLLC thanks for posting this!
2 -
The problem is resolved Imagick in PECL for ea-php83?
I don't like code deviations, nothing against the partner above who mentioned a temporary solution.
0 -
Mecca - when it is officially released, it will be fixed, yes.
0 -
Hey,
cPRex have good notices?
2 months and no news! Im looking forward to testing PHP 8.3 on cPanel0 -
The issue is still set to "open" on the PHP side of things.
0 -
Hey, have good news?
Im waiting for this to apply php 8.3 in my servers :D0 -
You have the same details I do from the Github case :D
0 -
Still no updates on this ?
I've found this fix but not sure how to apply it
https://gist.github.com/Wirone/d5c794b4fef0203146a27687e80588a6
Any advice ? I am too waiting for this to be resolved to update to PHP 8.3OSAlmaLinux v8.9.0 STANDARD standardcPanel Version0 -
Nope, nothing from PHP yet.
0 -
Any update?
0 -
You should really be asking PHP if there is an update, as this one isn't up to us at all.
0 -
Where can we do that ? Open a ticket or bump it with PHP ?
It seems its taking too long for such a common module
Edit:I ve found some issues open on https://github.com/Imagick/imagick/issues but not sure which one to bump or this is the place to ask for it
0 -
It would seem that this is the main case for the issue at this time:
0 -
Would there be any problems attempting to manually install imagick? https://github.com/Imagick/imagick/issues/640#issuecomment-2040748300
I understand it might have issues itself which I can test for, but would it cause issues within WHM/cPanel? I'm on CloudLinux and using their PHP selector.
0 -
You're welcome to try it! Although I can't say if it will properly interface with everything in cPanel, but many of our tools now simply rely on Yum.
0 -
WJNLLC, when using that code I get this after "make test":
make: *** [Makefile:136: test] Error 255Any ideas / suggestions on how to get past this, make this work?
And apparently the fix has been merged into the dev branch of Imagick, but nobody's rolled out the new release yet, and when I try the manual build / install approach above with this dev release, I get the same make test error...0 -
Serb Maybe you need ImageMagick-devel, if it is already installed then ignore if not then try again
yum install ImageMagick-devel -y0 -
I followed the WJNLLC entry -
cd /usr/src
wget https://codeload.github.com/Imagick/imagick/zip/refs/heads/master
unzip master
rm -fr master
mv imagick-master imagick
cd imagick
/opt/cpanel/ea-php83/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php83/root/usr/bin/php-config
make
make test
make install
echo "extension=imagick.so" >> /opt/cpanel/ea-php83/root/etc/php.d/imagick.ini
service httpd restart
cd ..
rm -fr imagickNow I am getting version mismatch. How do I properly uninstall this and go back to PECL package?
0 -
IIsengard - I can't say for sure, as manual installations that like aren't something we support. You'd want to under all that work and ensure there are no adjustments to the cPanel configuration files in /opt
0 -
Do install again at the last step try
make uninstall0 -
No, you'll have to remove everything by hand.
0 -
I get the following error -
[root@server imagick]# make uninstall
make: *** No rule to make target 'uninstall'. Stop.0 -
That's correct, because "uninstall" is not a valid command.
0 -
Was reading a bit and found this (it's been a looong time since I did C programming)
"Running
make -n install
can be helpful, since it will show the steps that the software would take to install itself but won't actually do anything. You can then manually reverse those steps."0
Please sign in to leave a comment.
Comments
30 comments