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

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\qa\qa-include\qa-db.php on line 556

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\qa\qa-include\app\format.php on line 1329

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\qa\qa-include\app\page.php on line 624

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\qa\qa-include\app\page.php on line 740

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\qa\qa-include\qa-base.php on line 722

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\qa\qa-include\qa-theme-base.php on line 310

........

..........

..............

..................... and a lot more!

Q2A version: latest

2 Answers

+2 votes
by
selected by
 
Best answer

Just use my unofficial PHP 8.1 compatible branch. 

by
This worked! Thank you.
by
+1
Thanks @pupi1985, This works very smoothly.
0 votes
by

Thank you for posting this. I also had the same error after installing the Q2A on XAMPP. I look around to see what could be the cause but there was no post on this. I also noticed that the file from Q2A installation page did not install at all on XAMPP, i had to download the  developer file from Github before it even install with the above error. 

Admin can you please look into this.

by
Yes, you are right. I had to download it twice,
First from here: https://www.question2answer.org/releases/question2answer-1.8.6.zip (Didn't work at all)

After searching, I found this post: https://github.com/q2a/question2answer/pull/947/files which had a fix.
So, I had to download it from here: https://github.com/q2a/question2answer .
Now, after installing the files I am getting above mentioned details. I believe we need to have a test site running on localhost so that we can work around and customize.
by
XAMPP using the newest version of php, and the official version of q2a does not support php V8.0 or 8.1 so you should downgrade the php version in XAMPP or using unofficial PHP 8.1 compatible branch.
...