gpt4 book ai didi

php - 当我想路由到我的站点时,我找不到 session 表

转载 作者:行者123 更新时间:2023-11-30 00:07:00 24 4
gpt4 key购买 nike

我正在研究 laravel,当我尝试迁移表时遇到了这个问题,它带来了一个旧错误,说存在一个我几个月前迁移的表。现在,当我想创建 session 表来保存用户 session 时,它不会迁移,而且路由也有问题。

它说:

PDOException was thrown when trying to read the session data: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'EUAEL.sessions' doesn't exist



当我想迁移 session 表时,我收到此错误:

PHP Fatal error: Cannot redeclare class AddOwnerToTvshow in /var/www/app/database/migrations/2014_05_05_090225_add_owner_to_tvshow.php on line 34 Error in exception handler: The stream or file "/var/www/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:70Error in exception handler: The stream or file "/var/www/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:70

最佳答案

根据错误消息分解!

Cannot redeclare class



使用 include_once对于你的类文件

要么

在添加类文件之前检查类是否存在
if (!class_exists('AddOwnerToTvshow')) {
include 'AddOwnerToTvshow.php';
}

The stream or file "/var/www/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied



确保
  • files设置为 644 , 和
  • directories755在您的服务器上
  • 关于php - 当我想路由到我的站点时,我找不到 session 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24447091/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com