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

Hi there,

I've setup a Q&A using the following versions:

  • Ubuntu 18, (using NGINX)
  • Q&A version 1.8.3 
  • MySQL 5.7 
  • PHP 7.2

My authentication is via LDAP and it's working pretty good. 

However, I noticed that when we try to add a new question, the following message pops out in the screen:

A Question2Answer database query failed when generating this page.

A full description of the failure is available in the web server's error log file.

So I went to the logs [/var/log/nginx/error.log] and found the following issues:


PHP message: PHP Question2Answer MySQL query error 42000: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Array','Array','Array','Array','Array','Array','Array','Array','Array'' at line 1 - Query: INSERT IGNORE INTO qa_words (word) VALUES ?,?,?,?,?,?,?,?,?" while reading response header from upstream, client: 10.2.40.200, server: devwiki.brq.com, request: "POST /qa/index.php?qa=ask HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "devwiki.brq.com", referrer: "http://devwiki.brq.com/qa/index.php?qa=ask"


I would like to know if there is an especific version of MySQL to be installed, or anything else that must be done or adjusted to get ride of this error.

Appreciate any help,

Thanks

Details:
 PHP:
7.2.19-0ubuntu0.18.04.1
MySQL:
5.7.26-0ubuntu0.18.04.1

Q2A version: 1.8.3

2 Answers

+5 votes
by
selected by
 
Best answer

Assuming that error is not being generated by a plugin, I think you might have downloaded the dev branch rather than the master branch. I would advise you to redownload the latest v1.8.3 from here and try again.

by
Sorry for my delay, I was in vacation.

Exactly. I got the wrong branch version and therefere had errors like this.
+1 vote
by

The problem was caused because I've dowloaded the dev branch which have some issues being solved. If you guys really wanna use the dev branch you can solve this specific problem applying the following patch:

https://github.com/q2a/question2answer/pull/737

Thanks for help.

...