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

Please help to check if my coding is correct need to instal Q2A with my Wordpress site getting error message Parse error: syntax error, unexpected '';' (T_CONSTANT_ENCAPSED_STRING) in /home/therabbitshop/public_html/forum/qa-config.php on line 139

1. www.therabbitshop.co.zw (WP blog not yet published), created subdomain: forum.therabbitshop.co.zw

3. WP is in public_html folder, forum folder is in public_html and I uploaded all the files in the unzipped Q2A folder into the forum folder.

5. downloaded latest Q2A and changed qa-config-example.php in the unzipped question2answer folder, and renamed it to qa-config.php.

6. The only section I edited in text editor is this one:

Out-of-the-box WordPress 3.x integration - to integrate with your WordPress site and user
    database, define QA_WORDPRESS_INTEGRATE_PATH as the full path to the WordPress directory
    containing wp-load.php. You do not need to set the QA_MYSQL_* constants above since these
    will be taken from WordPress automatically. See online documentation for more details.

    define('QA_WORDPRESS_INTEGRATE_PATH', ‘/home/therabbitshop');

       /* To allow redirection from WordPress login to Question2Answer */
        add_filter('allowed_redirect_hosts', 'qa_wordpress_redirect_hosts');
          function qa_wordpress_redirect_hosts($content) {
           $content[] = ’forum.therabbitshop.co.zw';
            return $content;
           }

Q2A version: question2answer-1.7.4

2 Answers

+1 vote
by
You should set respective path of your Wordpress root from qa-config.php

So if your WordPress is in public_html/ and your Q2A is in public_html/qa/ than your WordPress path will be ../ which is one directory up from your Q2A.

Hope this will help you to resolve the issue
by
Thank you very much for taking time to assist me with my challenge. Am not really good with coding and chances are that I might still be making a mistake in writing the correct path.

Please assist with the correct line as the one below  is still giving me this error message: Parse error: syntax error, unexpected '';' (T_CONSTANT_ENCAPSED_STRING) in /home/therabbitshop/public_html/forum/qa-config.php on line 139

 Is this path correct:--->   define('QA_WORDPRESS_INTEGRATE_PATH', ‘../public_html');

I can confirm Wordpress (including wp-load.php) is in public_html/ and folder for sub-domain forum.therabbitshop.co.zw is in public_html/ as well. All Q2A files have been uploaded in the forum folder.

---
    Out-of-the-box WordPress 3.x integration - to integrate with your WordPress site and user
    database, define QA_WORDPRESS_INTEGRATE_PATH as the full path to the WordPress directory
    containing wp-load.php. You do not need to set the QA_MYSQL_* constants above since these
    will be taken from WordPress automatically. See online documentation for more details.

    define('QA_WORDPRESS_INTEGRATE_PATH', ‘../public_html');

       /* To allow redirection from WordPress login to Question2Answer */
        add_filter('allowed_redirect_hosts', 'qa_wordpress_redirect_hosts');
          function qa_wordpress_redirect_hosts($content) {
           $content[] = ’forum.therabbitshop.co.zw';
            return $content;
           }
*/
+1 vote
by

Based on the code you posted, the error may be that you're using the wrong kind of apostrophe in your code.

In the part ‘../public_html' you used a curly apostrophe first, you should always use regular straight apostrophes like: '

...