{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:白板显示可能会有多种原因 待追加A:.env文件里类如APP_NAME="lara vel"中间如若有空格需加引号

数据库连接异常

Q:Malformed UTF-8 characters, possibly incorrectly encodedA:mysql或redis没有连接成功(一般情况)

数据库连接格式

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 LargeA:nginx默认上传文件为1mvim /usr/local/nginx/conf/nginx.conf在http中添加client_max_body_size 10m;

重启NGINX报错

Q:NGINX [error] open() /usr/local/Nginx/logs/nginx.pidA:指定配置文件重新加载/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 10075A: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 currentgit 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.cmdgs=git statusll=ls -gohlat --show-control-chars -F --color $*