Some Q2A plugins are not compatible with PhP 7 and MySQL 5.7

738 Views Asked by At

I updated PHP 5.6 to 7 and MySQL 5.5 to 5.7.

Everything was fine in the older versions, however since I updated the server some plugins such as: Custom 404 page, gregorian2jalali face problems. Some pages goes blank and the Inspect Element, Console section nothing shows. up. For example, if I activate gregorian2jalali plugin, User Profie page doesn't show up.

Also in the Custom 404 page plugin, the following error comes up in 404 pages:

A Question2Answer database query failed when generating this page. A full description of the failure is available in the web server's error log file. There was a related question for an earlier problem here: When adding page link, database query error occurs.

In the Apache Error Log, a message similar to this message comes up:

PHP Question2Answer MySQL query error 1146: Table 'qa.qa_options' doesn't exist - Query: (SELECT 'options' AS selectkey, title, content FROM qa_options) UNION ALL (SELECT 'time', 'db_time', UNIX_TIMESTAMP(NOW())) Also, there was an earlier problem here at this question: is there a way to manually create the database tables ?

Now that the plugin is not updated, how I can fix this problem ?

Thanks

Q2A version: 1.7.4

1

There are 1 best solutions below

0
On

There are two possibilities I can think of:

  1. You are using a different table prefix (e.g. abc_ instead of qa_) in your qa-config.php file, and a plugin is putting qa_options in their SQL queries instead of ^options as they should (which automatically adds the correct prefix).

  2. Or, you are using the unstable 1.8 version from GitHub which currently has a few issues regarding plugins. If so, make sure you're using the stable 1.7.4 version that you get from the main Q2A site.