develop wall
asked 8 years ago


I installed DWQA last week and it worked OK. Suddenly this morning, I noticed fatal errors on the site that were pointing to the DWQA plugin.

I disabled all plugins via PHPmyadmin apart from DWQA. When I try to re-activate DWQA via WPADmin, I am getting the following error:

Plugin could not be activated because it triggered a fatal error
Parse error: syntax error, unexpected T_FUNCTION, expecting ‘)’ in /home4/chachi1/public_html/ on line 3

I have uploaded the new autoload.php in dropbox as per your last response but it is not solving the issue.

Please assist urgently.

2 Answers
answered 8 years ago

Dear Develop Wall,
Can you give me an admin account throught a private answer here to help me check and solve your problem ?

answered 8 years ago

About this issue, you can open the autoload.php file in the wp-content/plugins/dw-question-answer/inc/ folder then replace with the following code:

function dwqa_autoload_function($className) {
    $classPath = explode('_', $className);

    if ( $classPath[0] != 'DWQA' ) {
    // Drop 'Google', and maximum class file path depth in this project is 3.
    $classPathSlice = array_slice($classPath, 1, 2);
    if ( count( $classPath ) > 3 ) {
        for ($i=3; $i < count( $classPath ); $i++) { 
            $classPathSlice[1] .= '_' . $classPath[$i];
    $filePath = DWQA_DIR . 'inc/' . implode('_', $classPathSlice) . '.php';
    if ( ! file_exists( $filePath ) ) {
        $filePath = DWQA_DIR . 'inc/' . implode('/', $classPathSlice) . '.php';
    if (file_exists($filePath)) {


Hope this helps !

Powered by DW Question & Answer Pro