php报错合集

PHP Startup: Unable to load dynamic library....

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php72-imagick/imagick.so' 原因是我装这个imagick装到一半取消了,然后只要和php有关的就会有如下错误

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php72-imagick/imagick.so' (tried: /usr/local/opt/php72-imagick/imagick.so (dlopen(/usr/local/opt/php72-imagick/imagick.so, 9): image not found), /usr/local/Cellar/php/7.2.7/lib/php/20170718//usr/local/opt/php72-imagick/imagick.so.so (dlopen(/usr/local/Cellar/php/7.2.7/lib/php/20170718//usr/local/opt/php72-imagick/imagick.so.so, 9): image not found)) in Unknown on line 0

这个错误基本是没有加载到这个配置的扩展

检查加载了哪些扩展

php -r "print phpinfo();" | grep ".ini"
....
/usr/local/etc/php/7.2/conf.d/ext-imagick.ini,
...

取消这个ini

cd /usr/local/etc/php/7.2/conf.d/ && mv ext-imagick.ini ext-imagick.ini.bak