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

I see some warnings in error_log while asking a new question (i think it occurs right after searching for similar questions in the question title input):

[26-Dec-2015 23:17:09 Europe/Istanbul] PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent (output started at /home/xxx/public_html/okul/qa-include/ajax/asktitle.php:76) in /home/xxx/public_html/okul/qa-include/app/users.php on line 146

[26-Dec-2015 23:17:09 Europe/Istanbul] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/okul/qa-include/ajax/asktitle.php:76) in /home/xxx/public_html/okul/qa-include/app/users.php on line 183

Q2A version: 1.7.2
What is your URL? Website?

2 Answers

+1 vote
Those particular errors are occurring because some content is being output before session_start is called (when the user auth is set up). Probably a different warning or notice.

You would be able to see this by looking in the Network tab of the browser dev tools. There will be a response that starts with "QA_AJAX_RESPONSE".

If you're able to consistently reproduce this, see if you can find the warning there. Also try removing all non-default plugins to see if the warning comes from one of those.
Still getting them. I'll install a demo version and test it on the server.
Same problem started to appear at my production installation. Weird. Cannot remember to have put any plugins. Could it be again a new browser like IE Edge (?) that is causing such problems? The ajax response is fine trying it in Firefox.
Bump, happens again on a new server!
Seems to be a bug, reported here as well (qa-include/ajax/asktitle.php:76):

Problem could be the "mysql connection limit".
+2 votes

Fixed by https://github.com/q2a/question2answer/issues/440


     $userid = qa_get_logged_in_userid();

in the beginning of asktitle.php