{info} 所有错误优先查看日志信息 配合ELK食用更佳
Laravel常见问题¶
Class config does not exist¶
Q:Uncaught exception 'ReflectionException' with message 'Class config does not exist'
A:删除 bootstrap/cache/\*.php
确认config目录下不缺少如app.php等配置文件
页面显示白板无任何错误信息¶
数据库连接格式¶
Q:SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'uam.roles.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
A:config/database.php
中所用到的数据库连接验证格式改为'strict' => false,
Nginx常见问题¶
超出上传文件限制¶
Q:413 Request Entity Too Large
A:nginx默认上传文件为1m
vim /usr/local/nginx/conf/nginx.conf
在http中添加client_max_body_size 10m;
重启NGINX报错¶
Q:NGINX [error] open() /usr/local/Nginx/logs/nginx.pid
A:指定配置文件重新加载
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
Git常见问题¶
重新忽略GIT文件¶
Q:ignore已被提交到git库的文件
A:原因:git ignore只会对不在git仓库中的文件进行忽略
解决:先删除文件 >> push(同步) >> 新建文件 >> ignore新文件 >> push
git diff提示filemode发生改变¶
Q:old mode 100644、new mode 10075
A:git config --add core.filemode false
更新远程仓库地址¶
Q:git 修改远程仓库地址
A1:直接修改覆盖原地址git remote set-url origin [url]
A2:先删后加git remote rm origin git remote add origin [url]
代码推送失败¶
Q:! [rejected] master -> master (non-fast-forward)
A:git config --global push.default current
git branch --set-upstream-to=origin/dev
提交代码时出现换行符问题¶
Q:warning: LF will be replaced by CRLF
A:git config --global core.autocrlf false
Win下CMDER软件使用¶
cmder添加常用命令别名¶
Q:cmder本为win下软件 不支持ll等Linux缩写A:vim c:\cmder\config\user_aliases.cmd
gs=git status
ll=ls -gohlat --show-control-chars -F --color $*