Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Please help on installing Q2A

+2 votes
185 views
asked Sep 19, 2017 in Q2A Core by alireza
Hi,

I've been trying to install Q2A for two days now with no success. I keep getting the error:

PHP Question2Answer MySQL query error 1146: Table 'demo.qa_options' doesn't exist - Query: SELECT title, content FROM qa_options

uppon loading the site for the first time. I never get to the installation screen. I've read all the posts about a bug for new installations. But I've tried all the versions from 1.6.3 upto 1.8 and I always get the same error. I have deleted the database and recreated it evrytime but I just can't get pass this error.

Is there a way to create this table manually?
Q2A version: 1.7.5
commented Sep 19, 2017 by Scott
Do you have the correct MySQL username/password and user permissions?
Are all the other tables created correctly? You can use phpMyAdmin to look at the database.
commented Sep 19, 2017 by alireza
Yes, to make sure I put a wrong password in and the error returned was different. No table is created at all. Nothing is shown when I go to the site and this error is returned.

1 Answer

+3 votes
answered Sep 19, 2017 by pupi1985

Based on your symptoms you might be lacking the appropriate MySQL user privileges. Take a look at the installation steps again:

4. Create a MySQL database, and a MySQL user with full permissions for that database. If you’re interested, the privileges actually needed are: CREATE, ALTER, DELETE, INSERT, SELECT, UPDATE, LOCK TABLES

Make sure the user has all those privileges.

Relavant links:

commented Sep 20, 2017 by pupi1985
It looks fine. As long as that information is properly set and you have the needed privileges on the root user, it should be fine. If the IP address is fine you could also check with 'localhost' instead of '127.0.0.1'. I've seen a couple of issues regarding that.

Once you have configured those settings all you need to do is to navigate to the root of your site and then you'll be redirected to the installation wizard. Use Q2A v1.7.5. Make sure you're hitting the appropriate URL :)

This is a long shot but you could also make sure you have mod_rewrite enabled in Apache. Or even access the install wizard directly: http://yoursite.com/index.php?qa=install

Maybe a longer shot would be that, assuming you're seeing that in the Apache's server error log file rather than in the browser, maybe you've somehow configured PHP to halt on errors so the first attempt to access the database, rather than throw the error and redirect to the wizard is just throwing the error.
commented Sep 20, 2017 by alireza
Thank you. The information you provided was a great help. Here is what I did:

I created the qa_options table manually using the query you provided.
Then I navigated to http://yoursite.com/index.php?qa=install (going to the root whould provide the same error) This time it prompted that the database is faulty and some tables are missing and it gave me a button to repair the database.
By clicking the button It created all the tables and it is working fine now.

Thank you again for your help
...