Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
536 views
in Q2A Core by
closed by

I've installed question2answer on a server from these instructions on an Ubuntu 22.04 server in AWS with Apache/2.4.52 and MariaDB Ver 15.1 Distrib 10.6.7-MariaDB.  There are no plugins being used.

Whenever I get to step 9, I get a 500 error, and when I look at the logs, I see that I'm getting this error--

Uncaught mysqli_sql_exception: Table 'dbname.qa_options' doesn't exist in /var/www/html/qa-include/qa-db.php:227

I've double- and triple-checked the database credentials.  And it also looks like qa_db_create_table_sql is not being called at all.

I see there are similar questions asked here through the years, but I'm finding no answers relevant to my setup.

I'm going to try to continue debugging this on my end to try to find out why this function isn't being called, but if anyone knows how to resolve this, please let me know.

Update: As a workaround, I put this at the beginning of qa_index_set_request() in qa-include/qa-index.php.

     // MANUAL CORRECTION.
     // install if request_uri is "install-0462"

     if ($_SERVER['REQUEST_URI'] == '/install-0462') {
             $msg = 'Starting manual fix for broken installation process.';
             error_log($msg);

             require QA_INCLUDE_DIR . '/db/install.php';

             qa_db_install_tables();
             qa_db_upgrade_tables();

             $msg = "Completed installing.";
             error_log($msg);

             exit();
     }

     // END MANUAL CORRECTION.

Then I just went to /install-0462 and it installed correctly.

That doesn't fix the problem, I guess, but it's working correctly otherwise, so far.  I also had to manually change the user permissions to get an admin user.

Q2A version: Version 1.8.6
by
edited by
–1
I'm not sure if Q2A supports MariaDB.
by
MariaDB was developed as a replacement for MySQL when that fell into the hands of Oracle. Thus it's largely compatible to MySQL. My own site is running on MariaDB 10.5 without issues.
...