1:无法访问,添加如下的配置:
location ~ \.php {
root /www/wwwroot/capital_mgr/public;
fastcgi_pass unix:/tmp/php-cgi-56.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
2:模块不存在:captcha
发现vender目录下面没内容
我们使用composer install安装我们在开发时候的库,
但是报了如下错误:
[Composer\Downloader\TransportException]
Content-Length mismatch, received 142349 bytes out of the expected 966737
是由于composer的源导致的,我们做一个配置:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
网上说有三个镜像:
更换成阿里镜像:composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
更换成Laravel China镜像: composer config -g repo.packagist composer https://packagist.laravel-china.org
更换成中国全量镜像:composer config -g repo.packagist composer https://packagist.phpcomposer.com
再次执行composer install安装完成。
captcha还是不能用
我们发现vender/topthink文件夹下没有 think-captcha目录,即没有安装扩展
我们使用composer require topthink/think-captcha
报如下错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- topthink/think-captcha v3.0.3 requires topthink/framework ^6.0.0 -> satisfi
明显是版本不匹配,
我们发现我们使用的的tp5.0.1版本,所以对应的captcha是1.*
我们使用下面的命令,执行后运行正常。
composer require topthink/think-captcha=1.*