安装Laravel11报如下错误
Illuminate\Database\QueryException SQLSTATE[HY000]: General error: 1 no such table: sessions (Connection: sqlite, SQL: select * from "sessions" where "id" = hsidQLWvAHEy4lHZMESjmWmckXdrNs5a2IO7N1aZ limit 1)
图示:
出现这个session报错问题是因为项目配置文件.env文件中session中默认配置文件是database,我们只需要将其注释,并改为文件即可
# SESSION_DRIVER=database # SESSION_LIFETIME=120 # SESSION_ENCRYPT=false # SESSION_PATH=/ # SESSION_DOMAIN=null SESSION_DRIVER=file SESSION_LIFETIME=120
如下图所示:
文章评论(0)