imagick icon indicating copy to clipboard operation
imagick copied to clipboard

Pecl imagick php-fpm. Unable to load dynamic library 'imagick.so'

Open diavila opened this issue 1 year ago • 2 comments

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.

diavila avatar Jun 01 '23 08:06 diavila

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.

Danack avatar Jun 01 '23 11:06 Danack

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.

diavila avatar Jun 02 '23 10:06 diavila