Closed zhongjiao01 closed 2 years ago
[2022-02-11 14:18:02] production.ERROR: Class 'PDO' not found {"exception":"[object] (Error(code: 0): Class 'PDO' not found at /var/www/html /code6/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1289) [stacktrace]
ion::getResolver()
rs\ConnectionFactory->createConnection()
rs\ConnectionFactory->createSingleConnection()
onFactory->make()
Connection()
nection()
olveConnection()
Connection()
BaseQueryBuilder()
ModelQuery()
wQueryWithoutScopes()
wQuery()
call()
ainer\{closure}()
)
Method()
()
"}
PHP 没有安装 PDO 扩展
大佬帮忙看看报这个日志啥意思 [stacktrace]
"}
做了什么操作报错,能提供完整一点的日志吗
其实还是源码部署code6,上次说没有php拓展pdo,我重新安装了php和相关拓展,然后出现页面访问直接500的情况,其它日志没什么内容 [2022-02-14 15:43:11] production.ERROR: SQLSTATE[HY000] [1049] Unknown database 'code6' (SQL: select from information_schema.tables where table_schema = code6 and table_name = migrations and table_type = 'BA SE TABLE') {"exception":"[object] (Illuminate\Database\QueryException(code: 1049): SQLSTATE[HY000] [1049] Unknown database 'code6' (SQL: select from information_schema.tables where table_schema = code6 and table_name = migrations and table_type = 'BASE TABLE') at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671) [stacktrace]
[previous exception] [object] (PDOException(code: 1049): SQLSTATE[HY000] [1049] Unknown database 'code6' at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70) [stacktrace]
)
"} [2022-02-14 15:45:03] production.ERROR: Command "code6:user-addd" is not defined.
Did you mean one of these? code6:job-add code6:job-run code6:notify code6:user-add code6:user-delete code6:user-list {"exception":"[object] (Symfony\Component\Console\Exception\CommandNotFoundException(code: 0): Command \"code6:user-addd\" is not defined.
Did you mean one of these? code6:job-add code6:job-run code6:notify code6:user-add code6:user-delete code6:user-list at /var/www/html/vendor/symfony/console/Application.php:644) [stacktrace]
"}
自动创建数据表的时候由于没有 PDO 扩展,执行失败
现在执行 php artisan migrate
导入数据表看下
数据表,和用户已经都弄完了 [root@bogon html]# php artisan migrate
Application In Production! *
Do you really wish to run this command? (yes/no) [no]:
yes
Migration table created successfully. Migrating: 2020_03_19_065140_create_config_token_table Migrated: 2020_03_19_065140_create_config_token_table (0.03 seconds) Migrating: 2020_03_19_070047_create_config_job_table Migrated: 2020_03_19_070047_create_config_job_table (0.01 seconds) Migrating: 2020_03_19_071658_create_config_whitelist_table Migrated: 2020_03_19_071658_create_config_whitelist_table (0.02 seconds) Migrating: 2020_03_19_072251_create_queue_job_table Migrated: 2020_03_19_072251_create_queue_job_table (0.01 seconds) Migrating: 2020_03_19_073207_create_code_leak_table Migrated: 2020_03_19_073207_create_code_leak_table (0.02 seconds) Migrating: 2020_03_19_080321_create_code_fragment_table Migrated: 2020_03_19_080321_create_code_fragment_table (0.01 seconds) Migrating: 2020_04_29_170507_create_user_table Migrated: 2020_04_29_170507_create_user_table (0.02 seconds) Migrating: 2020_06_13_143710_add_store_type_to_config_job_table Migrated: 2020_06_13_143710_add_store_type_to_config_job_table (0.02 seconds) Migrating: 2020_06_13_150004_add_index_repo_owner_and_repo_name_to_code_leak_table Migrated: 2020_06_13_150004_add_index_repo_owner_and_repo_name_to_code_leak_table (0.01 seconds) Migrating: 2020_07_03_091934_change_status_to_config_token_table Migrated: 2020_07_03_091934_change_status_to_config_token_table (0 seconds) Migrating: 2020_07_14_150603_create_config_notify_table Migrated: 2020_07_14_150603_create_config_notify_table (0.02 seconds) Migrating: 2021_05_08_104925_create_config_whitelist_file_table Migrated: 2021_05_08_104925_create_config_whitelist_file_table (0.01 seconds) Migrating: 2021_06_01_111745_create_config_common_table Migrated: 2021_06_01_111745_create_config_common_table (0.04 seconds)
正常了吗
不正常还是报500,异常之前就已经创建相应的表了
你把日志清空了,再访问,然后提供新的日志 你贴的日志好像跟 500 错误无关
我访问的500错误,没有产生新的日志
源码根目录
vim .env
APP_ENV=local
APP_DEBUG=true
然后看下页面有无错误提示,是否生成错误日志
没有看到生成新的错误日志, -rwxr-xr-x 1 apache apache 290868 2月 13 23:27 code6-2022-02-11.log -rw-r--r-- 1 root root 1 2月 14 00:03 code6-2022-02-14.log -rwxr-xr-x 1 apache apache 14887 2月 13 23:27 job-add-2022-02-11.log -rwxr-xr-x 1 apache apache 10388 2月 13 23:27 job-run-2022-02-11.log -rwxr-xr-x 1 apache apache 8986 2月 13 23:27 notify-2022-02-11.log
页面上没有任何报错吗
页面报以下错误 该网页无法正常运作 192.168.209.129 目前无法处理此请求。 HTTP ERROR 500
我 QQ 加你看下吧,你留个联系方式
2431241480,谢谢大佬
麻烦提供 storage/logs 下的报错信息