Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
586 views
in Q2A Core by
I need to migrate to php version 7

Does q2a work with this version?
And do you recommend to use php 7?

Thanks.
by
Can you give some details of the problems you’re having on PHP 7? I know there were some notices on PHP 7.1 (fixed in Q2A 1.8) but they don’t break anything on the site.
by
@Scott
No problem with q2a.
I had some problems with some plugins by Sama like "Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;" which I fixed.

2 Answers

+2 votes
by
Yes, it does and I found it to be working much better on PHP 7.
by
Thanks. It seems q2a version 1.7.5 doesn't work with php7, does it?
by
thanks also looked for this answer
+2 votes
by
Q2A performance is better on php7. below q2a test site is running on php7.

https://meta.question2answer.info
by
Thanks. But It seems q2a version 1.7.5 doesn't work with php7!
by
Yes, I guess there are some functions which you need to modify for php7.
by
Q2a 1.7.5 is broken for php 5.3 and 7.0, see
https://travis-ci.org/q2a-info/question2answer
by
Thanks @Prothoughts. Now I have 1.8
by
"Q2a 1.7.5 is broken for php 5.3 and 7.0" -> This is absolutely false

Firstly, Q2A works perfectly fine in any PHP 5.2+ version. In the latest PHP versions (I think this started happening on 7.1) you'd get a few notices or warnings that can absolutely be ignored or even manually fixed by changing just a few lines (they can be taken from the fixes in the 1.8 or dev branch in the repo)

Secondly, you've linked to a build of a repository that is not the official Q2A repository. Here are the builds for Q2A: https://travis-ci.org/q2a/question2answer/builds and, in particular for v1.7.5, this one: https://github.com/travis-ci/travis-ci/issues/2963

Thirdly, the fact that a build fails doesn't mean Q2A doesn't work or that it is broken. It just means the build failed. Understanding why that happened should lead (or not) to that conclusion. In fact, if you see the link I provided it failed, but the reason is absolutely unrelated to Q2A:  "The command "phpenv global 5.3" failed and exited with 1 during". This issue happens because PHP support for 5.3 on Ubuntu Trusty is dropped (you can see here: https://github.com/travis-ci/travis-ci/issues/2963).

In conclusion: it works perfectly fine up to 7.0 and you get a few notices/warnings in your web server log if you use 7.1+ and that's it
by
My php version is 7.0.9.
by
@pupi1985 Thanks for the correction. I just looked at travis log and commented, my mistake.
by
You should be able to use 7.0.x without any warnings/logs (plugins might generate some but it would depend on the plugin). Anyway. v1.8 will be out soon and there won't be many changes from the beta to the release version.
by
Two problem I have from the time I upgraded to q2a 1.8beta and  php 7.0.9:

http://question2answer.org/qa/60889/403-forbidden-access-to-this-resource-on-the-server-is-denied
I have this problem with just having badges plugin in my qa-plugin folder.

http://question2answer.org/qa/60954/errors-while-upgrading-to-1-8
...