First time I start running Q2A site but i got belows error in nginx error log:
2022/07/06 18:01:20 [error] 18996#22728: *7 FastCGI sent in stderr: "PHP Fatal error: Uncaught mysqli_sql_exception: Table 'q2a_db.qa_options' doesn't exist in H:\nginx_test\nginx\qa\qa-include\qa-db.php:227
Stack trace:
#0 H:\nginx_test\nginx\qa\qa-include\qa-db.php(227): mysqli->query()
#1 H:\nginx_test\nginx\qa\qa-include\qa-db.php(202): qa_db_query_execute()
#2 H:\nginx_test\nginx\qa\qa-include\qa-db.php(557): qa_db_query_raw()
#3 H:\nginx_test\nginx\qa\qa-include\qa-db.php(590): qa_db_single_select()
#4 H:\nginx_test\nginx\qa\qa-include\app\options.php(135): qa_db_multi_select()
#5 H:\nginx_test\nginx\qa\qa-include\qa-base.php(403): qa_preload_options()
#6 H:\nginx_test\nginx\qa\qa-include\qa-page.php(36): qa_initialize_postdb_plugins()
#7 H:\nginx_test\nginx\qa\qa-include\qa-index.php(188): require('...')
#8 H:\nginx_test\nginx\qa\index.php(27): require('...')
#9 {main}
thrown in H:\nginx_test\nginx\qa\qa-include\qa-db.php on line 227" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:81"
Obviously, it has successfully connected to the database service, but has not accessed the specified table.
It looks the site not create required table in database at first running.
What I do:
Configure the site according to "https://docs.question2answer.org/install/".
Start php-cgi.exe, start nginx.exe, access index.php.
=> Got state code 500, got error above in error.log
What should I do?
Software version:
Q2A: 1.8.6
PHP: 8.1.8
nginx: 1.23.0
MySQL: 8.0.25
OS: windows 10