问题背景:
yii 上传图片失败,查日志如下所示
2019-07-31 16:13:14 [167.179.86.167][-][-][error][yii\base\InvalidConfigException] exception 'yii\base\InvalidConfigException' with message 'The fileinfo PHP extension is not installed.' in /home/wwwroot/default/vendor/yiisoft/yii2/helpers/BaseFileHelper.php:153
Stack trace:
Composer (version 1.8.6) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
Composer install successfully.
Install ZendGuardLoader for PHP 5.6...
Notice: zend-loader-php5.6-linux-x86_64.tar.gz not found!!!download now...
--2019-07-31 20:05:48-- https://soft.vpser.net/web/zend/zend-loader-php5.6-linux-x86_64.tar.gz
Resolving soft.vpser.net (soft.vpser.net)... 101.37.67.17
Connecting to soft.vpser.net (soft.vpser.net)|101.37.67.17|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://175.6.32.4:88/soft/web/zend/zend-loader-php5.6-linux-x86_64.tar.gz [following]
--2019-07-31 20:05:48-- http://175.6.32.4:88/soft/web/zend/zend-loader-php5.6-linux-x86_64.tar.gz
Connecting to 175.6.32.4:88... connected.
HTTP request sent, awaiting response... 200 OK
Length: 671359 (656K) [application/octet-stream]
Saving to:‘zend-loader-php5.6-linux-x86_64.tar.gz’zend-loader-php5.6- 100%[===================>] 655.62K --.-KB/s in 0.1s
2019-07-31 20:05:48 (5.18 MB/s) -‘zend-loader-php5.6-linux-x86_64.tar.gz’saved [671359/671359]
Write ZendGuardLoader to php.ini......
grep: /usr/local/apache/conf/httpd.conf: No such file or directory
Download Opcache Control Panel...
Creating new php-fpm configure file......
Copy php-fpm init.d file......
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
Starting LNMP...
Starting nginx... done
Starting mysql (via systemctl): mysql.service.
Starting php-fpm done
======== upgrade php completed ======
1929 vi lnmp.conf
1930 ./addons.sh
1931 ls
1932 ./upgrade.sh
1933 history