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

Here is my error:
[27-Mar-2024 11:49:31 UTC] PHP Fatal error:  Uncaught Error: Class "mysqli" not found in /home/username/public_
html/qa-include/qa-db.php:84

I am using the version 1.6.3.

Hosting: godaddy
________________________________________________________________

There was an issue yesterday and I backed up the files. But then I got this error.
Now I cannot use my website. (HTTP ERROR 500)


I am a user just downloading, and then writing questions and answers. That's all. I don't know the details too much. 

Can you give me a way to solve this problem without losing any of my questions and answers?

Thanks in advance!

Q2A version: 1.6.3

1 Answer

0 votes
by

Why such a low version of Q2A on a fresh installation?! There's newer versions here.


It appears GoDaddy's default PHP version does not include MySQLi. #

You have to go to settings and upgrade PHP to the latest version.
Newer versions include MySQLi. Video tutorial.

by
Thanks for your answer.

GoDaddy's customer services tried nearly all versions to fix the error but in the end, they said the reason is this one (mysqli).

The reason I did not change the version is I don't know how to carry my old q&a to the new version.  I searched for how to do it but couldn't find.
Can you please tell me how to do it? It may help.

The only thing I want is to rescue my q&a.
by
The PHP version is what you need to upgrade. Not the MySQLi version.

Have you followed the steps of the video in my answer to upgrade the PHP version of your site??

If the steps are too difficult to follow, just tell GoDaddy's Customer Support that the error is showing up because the MySQLi extension is missing from that version of PHP.
Ask them to upgrade PHP to the latest version.

---------
To upgrade Q2A, follow these steps:
https://docs.question2answer.org/install/upgrade/
by
Thx for your help. I did what you said. But it wasn't just about PHP. The backup made some files break as far as I understand.

This is how I solve:
I download q2a script (the latest version) again.

I copied the followings from old version and put them in new version:
    define('QA_MYSQL_HOSTNAME', 'localhost');
    define('QA_MYSQL_USERNAME', 'username');
    define('QA_MYSQL_PASSWORD', 'password');
    define('QA_MYSQL_DATABASE', 'database');

    define('QA_MYSQL_TABLE_PREFIX', 'qa_');

Now everything is well.
...