WordPress.org

Support

Support » Plugins and Hacks » URGENT – Parse error: syntax error, unexpected ')'

URGENT – Parse error: syntax error, unexpected ')'

  • Please help, I can’t access my online store. When I tried to go on to my site this morning I found the following error:

    Parse error: syntax error, unexpected ‘)’ in /home/theapiar/public_html/wp-content/plugins/backwpup/inc/class-admin.php on line 402

    The relevant area of code for that plugin is as follows:

    public function admin_page_logs( $page_hooks ) {
    
        $this->page_hooks[ 'backwpuplogs' ] = add_submenu_page( 'backwpup', __( 'Logs', 'backwpup' ), __( 'Logs', 'backwpup' ), 'backwpup_logs', 'backwpuplogs', array( 'BackWPup_Page_Logs', 'page' ) );
    
        add_action( 'load-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Admin', 'init_generel' ) );
    
        add_action( 'load-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Page_Logs', 'load' ) );
    
        add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Page_Logs', 'admin_print_styles' ) );
    
        add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Page_Logs', 'admin_print_scripts' ) );
    
        return $page_hooks;
    
    }

    I can’t see anything wrong with the code, but there has to be something there. Can anyone help me out with the unexpected ‘)’ – I don’t want to delete the wrong thing.

    The full file can be found at pastebin.com/3xPDiVcu

    https://wordpress.org/plugins/backwpup/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey, It’s hard not to see what’s wrong!

    There are a few kilobytes of malicious code at the top of the file. And most likely the file itself is corrupted. It’s this hack:
    http://blog.sucuri.net/2014/07/malware-infection-breaking-wordpress-sites.html

    You need to restore everything from a clean backup, reinstall plugins (make sure you update them all) and delete the maliciouc admin user.

    Yeah I didn’t know what that was but didn’t know enough about this to delete it. I’m just wondering how I go about restoring everything from a backup when I can’t access the site. I’ve looked through a lot of other files via FTP and it seems that malicious code seems to be everywhere.
    I don’t know how/if a restore can be done through CPanel or Win SCP. Any help would be greatly appreciated.

    Just reinstall WordPress to restore core files. Then disable all plugins by renaming the wp-content/plugins directory. FTP is enough for that.
    At this point you should be able to login into WordPress.

    Check for the malicious admin user (it has no name) and delete it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘URGENT – Parse error: syntax error, unexpected ')'’ is closed to new replies.