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

Hi, I'm new to this site. I want to install this site in my local server. But I'm unable to do so.

I'm following https://docs.question2answer.org/install/ but getting following database error.

Fatal error: Uncaught mysqli_sql_exception: Table 'qa_tuts.qa_options' doesn't exist in C:\xampp\htdocs\qa\qa-include\qa-db.php:227 Stack trace: #0 C:\xampp\htdocs\qa\qa-include\qa-db.php(227): mysqli->query('SELECT title, c...') #1 C:\xampp\htdocs\qa\qa-include\qa-db.php(202): qa_db_query_execute('SELECT title, c...') #2 C:\xampp\htdocs\qa\qa-include\qa-db.php(557): qa_db_query_raw('SELECT title, c...') #3 C:\xampp\htdocs\qa\qa-include\qa-db.php(590): qa_db_single_select(Array) #4 C:\xampp\htdocs\qa\qa-include\app\options.php(135): qa_db_multi_select(Array) #5 C:\xampp\htdocs\qa\qa-include\qa-base.php(403): qa_preload_options() #6 C:\xampp\htdocs\qa\qa-include\qa-page.php(36): qa_initialize_postdb_plugins() #7 C:\xampp\htdocs\qa\qa-include\qa-index.php(188): require('C:\\xampp\\htdocs...') #8 C:\xampp\htdocs\qa\index.php(27): require('C:\\xampp\\htdocs...') #9 {main} thrown in C:\xampp\htdocs\qa\qa-include\qa-db.php on line 227

Can anyone help me ?

Q2A version: latest version
by
1. What was the last successful step you accomplished?
 2. What link did you use to download the version you're installing?
by
1. upto 8th step, https://docs.question2answer.org/install/
     renaming, mysql database, user creation, updating the details of created credentials in qa-config and placing them into htdocs.

2. https://github.com/q2a/question2answer/releases
by
1. What's the name of the database you have created?
2. What's the name of the database in the qa-config.php file?
3. What other changes have you made to the qa-config.php file?
by
1. qa_tuts database and added one user with name qa_tuts and password demo
2.     define('QA_MYSQL_USERNAME', 'qa_tuts');
    define('QA_MYSQL_PASSWORD', 'demo');
    define('QA_MYSQL_DATABASE', 'qa_tuts');
No other changes, i made except this.
by
Have you given the user all the needed privileges? Grant it all, just in case, considering it is a demo user
by
yes sir, given all privileges.

Not able to add images in the comment section :(
by
I didn't add any tables in the database sir.
by
@pupi, sir any recent video about how to install q2a site ?
by
Installation is dependent on user setup. But is your MySQL database proper? Can you see tables there?
by
sir, I didn't have any tables in my Database. I didn't found any references to what are the tables and schema of those tables in the database anywhere in that installation links.
by
Actually all should get installed automatically. It's strange that you're getting table missing error when the tables are not even created. What's the PHP and MySQL versions you're using?
by
I think you are not using the right schema, or MySQL instance. The issue seems to be unrelated to Q2A. Everything gets installed automatically in the short wizard when you access the URL the site for the first time.
by
But why isn't Q2A throwing the appropriate error? I expect an table creation or access error rather than table not found error.
by
+1
It is hard to provide a diagnose without a patient. I don't even have steps to reproduce this (I have steps, but they don't reproduce the error on my end). Having said so, I've seen that kind of behavior with some plugins causing conflict during upgrade processes. That might be a possible cause
by
I used xampp server ( Apache + MariaDB + PHP + Perl ) from the link https://www.apachefriends.org/index.html, later i come to know that Mysql is required rather than MariaDB.

So I installed Mysql from the site https://dev.mysql.com/downloads/mysql/

Still same problem, So i remove xampp, and install Apache,Php and Mysql from the guidlines in the link https://freelancedev.tech/how-to-setup-apache-php-and-mysql-on-windows-10/

after that i installed phpmyadmin too for my convinience, then try to install q2a, but still the same error i'm getting.

I'm only renaming, changing user credentials and database in qa-config.php file, nothing else i'm doing.

I also checked whether the given user able to create tables or not in the database by using phpmyadmin - Yes, it's creating new tables.

Finally, I'm moving into Linux instead of windows in coming days.
by
So, it's a clean Q2A installation. Which windows is it? 7,8,10 or 11?

But yes, moving to Linux is way easier for setting up websites
by
sir, it's windows 8.
by
Same configuration working in ubuntu. Not able to trace the problem with windows

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...