- Laravel Version: 9.33.0
- PHP Version: 8.1.9
- Laravel-admin: 1.*
- 宝塔管理面板:7.9.4
1、报错信息
Error
Class "finfo" not found
at vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php:48
44▕ ExtensionToMimeTypeMap $extensionMap = null,
45▕ ?int $bufferSampleSize = null,
46▕ array $inconclusiveMimetypes = self::INCONCLUSIVE_MIME_TYPES
47▕ ) {
➜ 48▕ $this->finfo = new finfo(FILEINFO_MIME_TYPE, $magicFile);
49▕ $this->extensionMap = $extensionMap ?: new GeneratedExtensionToMimeTypeMap();
50▕ $this->bufferSampleSize = $bufferSampleSize;
51▕ $this->inconclusiveMimetypes = $inconclusiveMimetypes;
52▕ }
2、在宝塔里查看扩展和phpinfo里查看,fileinfo已经安装了
3、终端 php -i|grep fileinfo 查看,发现fileinfo是被'--disable-fileinfo'
4、php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvsem
tokenizer
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
能想到的办法都试了,但是问题依旧没有解决,求路过大神帮忙搭救一下
|
|