When upgrading php from 7.2 to 7.4 in centos 8, then restart php-fpm service, an error message below occoured.
NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'zip.so' (tried: /usr/lib64/php/modules/zip.so (/usr/lib64/php/modules/zip.so: undefined symbol: zip_register_cancel_callback_with_state), /usr/lib64/php/modules/zip.so.so (/usr/lib64/php/modules/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Check out the file, it does exists,
ls -lh /usr/lib64/php/modules/zip.so
-rwxr-xr-x. 1 root root 78K Jul 9 2020 /usr/lib64/php/modules/zip.so
This is because the libzip version does not match the zip.so needed, libzip should auto be updated. Run
the following command to update libzip, and then restart php-fpm service.
yum install -y libzip