imagick
imagick copied to clipboard
Pecl imagick php-fpm. Unable to load dynamic library 'imagick.so'
Hello,
I can't load imagick.so in php-fpm. I get "PHP message: PHP Warning: Startup: Unable to load dynamic library 'imagick.so' undefined symbol: core_globals_offset."
Using PHP as an Apache module works just fine.
This is how I compiled pecl imagick: wget https://pecl.php.net/get/imagick-3.7.0.tgz tar -zxvf imagick-3.7.0.tgz cd imagick-3.7.0 phpize ./configure make make install
I have tried PHP versions 7 an 8 with same result.
Thanks.
Did you install PHP-FPM and the PHP apache module at the same? And they are both definitely the same version?
What you're seeing is kind of consistent with compiling Imagick against a current version of PHP, and are trying to run it in a much older version of PHP.
That was a good clue. It works specifying the path to php-config.
cd imagick-3.7.0 /opt/php-8.1.19/bin/phpize ./configure --with-php-config=/opt/php-8.1.19/bin/php-config make make install
Thankyou very much.