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

When I click "Ask the Question" button and the categories become loading to apper,

 it displays the page at site.com says "A database error occurred" WHY ? How I can resolve this issue But it do not appears when I block the JavaScript from the browser options

 

And these are the errors in the error log :


[10-Jul-2015 07:42:02 America/Denver] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/isalna/public_html/qa-include/ajax/asktitle.php:76) in /home/isalna/public_html/qa-include/app/users.php on line 146
[10-Jul-2015 07:42:51 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in /home/isalna/public_html/qa-include/qa-base.php(572) : eval()'d code on line 77
[10-Jul-2015 00:28:23 America/Denver] PHP Fatal error:  Cannot redeclare get_base_url() (previously declared in /home/isalna/public_html/qa-plugin/qawork/functions.php:7) in /home/isalna/public_html/qa-plugin/ra-option-panel/qa-plugin.php on line 69
[10-Jul-2015 00:28:23 America/Denver] PHP Fatal error:  Cannot redeclare get_base_url() (previously declared in /home/isalna/public_html/qa-plugin/qawork/functions.php:7) in /home/isalna/public_html/qa-plugin/ra-option-panel/qa-plugin.php on line 69
[10-Jul-2015 00:18:43 America/Denver] PHP Notice:  Trying to get property of non-object in /home/isalna/public_html/qa-theme/SnowFlat/qa-theme.php on line 309
[10-Jul-2015 00:18:43 America/Denver] PHP Notice:  Trying to get property of non-object in /home/isalna/public_html/qa-theme/SnowFlat/qa-theme.php on line 309
[06-Jul-2015 09:19:45 America/Denver] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/isalna/public_html/qa-include/ajax/asktitle.php:76) in /home/isalna/public_html/qa-include/app/users.php on line 146
[07-Jul-2015 07:12:17 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in /home/isalna/public_html/qa-include/qa-base.php(572) : eval()'d code on line 77
[08-Jul-2015 16:23:43 America/Denver] PHP Warning:  mysqli::mysqli() [<a href='mysqli.mysqli'>mysqli.mysqli</a>]: (HY000/1040): Too many connections in /home/isalna/public_html/qa-include/qa-db.php on line 66

by
Some of those errors are from a plugin "ra-option-panel" maybe they are causing the problem?
by
But I do not have a plugin named "ra-option-panel"
by
This line says you do:
PHP Fatal error:  Cannot redeclare get_base_url() (previously declared in /home/isalna/public_html/qa-plugin/qawork/functions.php:7) in /home/isalna/public_html/qa-plugin/ra-option-panel/qa-plugin.php on line 69

There must be a file at qa-plugin/ra-option-panel/qa-plugin.php

2 Answers

+1 vote
by
Last error shows "(HY000/1040): Too many connections". Most likely there is some restriction on database connection on the server. Also, make sure that none of your MySQL tables are marked as crashed.
by
See the date of errors above it did not pasted by date
+1 vote
by

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

Add 

     $userid = qa_get_logged_in_userid();

in the beginning of asktitle.php

by
I added the line, but that caused other problems.
...