• I am the webmaster currently for the following website msdlawaz.com and am having difficulty logging into the website’s dashboard. This is a self hosted WordPress site. Also the site has somehow been hacked to display spam links for Cialis and Viagra. I will post a separate thread though asking how to remove that.

    When I go to the login page msdlawaz.com/wp-admin this is what I see:

    Parse error: syntax error, unexpected $end in /home/content/82/9493782/html/wp-admin/includes/update.php on line 234

    I have opened the file in question here are the contents of the file.

    <?php
    /**
    * Update/Install Plugin/Theme administration panel.
    *
    * @package WordPress
    * @subpackage Administration
    */

    if ( ! defined( ‘IFRAME_REQUEST’ ) && isset( $_GET[‘action’] ) && in_array( $_GET[‘action’], array( ‘update-selected’, ‘activate-plugin’, ‘update-selected-themes’ ) ) )
    define( ‘IFRAME_REQUEST’, true );

    /** WordPress Administration Bootstrap */
    require_once( dirname( __FILE__ ) . ‘/admin.php’ );

    include_once ABSPATH . ‘wp-admin/includes/class-wp-upgrader.php’;

    if ( isset($_GET[‘action’]) ) {
    $plugin = isset($_REQUEST[‘plugin’]) ? trim($_REQUEST[‘plugin’]) : ”;
    $theme = isset($_REQUEST[‘theme’]) ? urldecode($_REQUEST[‘theme’]) : ”;
    $action = isset($_REQUEST[‘action’]) ? $_REQUEST[‘action’] : ”;

    if ( ‘update-selected’ == $action ) {
    if ( ! current_user_can( ‘update_plugins’ ) )
    wp_die( __( ‘You do not have sufficient permissions to update plugins for this site.’ ) );

    check_admin_referer( ‘bulk-update-plugins’ );

    if ( isset( $_GET[‘plugins’] ) )
    $plugins = explode( ‘,’, stripslashes($_GET[‘plugins’]) );
    elseif ( isset( $_POST[‘checked’] ) )
    $plugins = (array) $_POST[‘checked’];
    else
    $plugins = array();

    $plugins = array_map(‘urldecode’, $plugins);

    $url = ‘update.php?action=update-selected&plugins=’ . urlencode(implode(‘,’, $plugins));
    $nonce = ‘bulk-update-plugins’;

    wp_enqueue_script( ‘updates’ );
    iframe_header();

    $upgrader = new Plugin_Upgrader( new Bulk_Plugin_Upgrader_Skin( compact( ‘nonce’, ‘url’ ) ) );
    $upgrader->bulk_upgrade( $plugins );

    iframe_footer();

    } elseif ( ‘upgrade-plugin’ == $action ) {
    if ( ! current_user_can(‘update_plugins’) )
    wp_die(__(‘You do not have sufficient permissions to update plugins for this site.’));

    check_admin_referer(‘upgrade-plugin_’ . $plugin);

    $title = __(‘Update Plugin’);
    $parent_file = ‘plugins.php’;
    $submenu_file = ‘plugins.php’;

    wp_enqueue_script( ‘updates’ );
    require_once(ABSPATH . ‘wp-admin/admin-header.php’);

    $nonce = ‘upgrade-plugin_’ . $plugin;
    $url = ‘update.php?action=upgrade-plugin&plugin=’ . urlencode( $plugin );

    $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact(‘title’, ‘nonce’, ‘url’, ‘plugin’) ) );
    $upgrader->upgrade($plugin);

    include(ABSPATH . ‘wp-admin/admin-footer.php’);

    } elseif (‘activate-plugin’ == $action ) {
    if ( ! current_user_can(‘update_plugins’) )
    wp_die(__(‘You do not have sufficient permissions to update plugins for this site.’));

    check_admin_referer(‘activate-plugin_’ . $plugin);
    if ( ! isset($_GET[‘failure’]) && ! isset($_GET[‘success’]) ) {
    wp_redirect( admin_url(‘update.php?action=activate-plugin&failure=true&plugin=’ . urlencode( $plugin ) . ‘&_wpnonce=’ . $_GET[‘_wpnonce’]) );
    activate_plugin( $plugin, ”, ! empty( $_GET[‘networkwide’] ), true );
    wp_redirect( admin_url(‘update.php?action=activate-plugin&success=true&plugin=’ . urlencode( $plugin ) . ‘&_wpnonce=’ . $_GET[‘_wpnonce’]) );
    die();
    }
    iframe_header( __(‘Plugin Reactivation’), true );
    if ( isset($_GET[‘success’]) )
    echo ‘<p>’ . __(‘Plugin reactivated successfully.’) . ‘</p>’;

    if ( isset($_GET[‘failure’]) ){
    echo ‘<p>’ . __(‘Plugin failed to reactivate due to a fatal error.’) . ‘</p>’;

    error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    @ini_set(‘display_errors’, true); //Ensure that Fatal errors are displayed.
    wp_register_plugin_realpath( WP_PLUGIN_DIR . ‘/’ . $plugin );
    include( WP_PLUGIN_DIR . ‘/’ . $plugin );
    }
    iframe_footer();
    } elseif ( ‘install-plugin’ == $action ) {

    if ( ! current_user_can(‘install_plugins’) )
    wp_die( __( ‘You do not have sufficient permissions to install plugins on this site.’ ) );

    include_once ABSPATH . ‘wp-admin/includes/plugin-install.php’; //for plugins_api..

    check_admin_referer(‘install-plugin_’ . $plugin);
    $api = plugins_api(‘plugin_information’, array(‘slug’ => $plugin, ‘fields’ => array(‘sections’ => false) ) ); //Save on a bit of bandwidth.

    if ( is_wp_error($api) )
    wp_die($api);

    $title = __(‘Plugin Install’);
    $parent_file = ‘plugins.php’;
    $submenu_file = ‘plugin-install.php’;
    require_once(ABSPATH . ‘wp-admin/admin-header.php’);

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter maneeshpangasa

    (@maneeshpangasa)

    Update: I think I know what the problem is line 234 is missing information. What is supposed to go in line 234?

    Here are lines 233 and 235:

    check_admin_referer(‘theme-upload’)

    $file_upload = new File_Upload_Upgrader(‘themezip’, ‘package’);

    Where did your theme, Put, come from?

    Thread Starter maneeshpangasa

    (@maneeshpangasa)

    I could be mistaken but I think this theme put is from codex.wordpress.org/templatehierarchy. When I open this themne’s folder and open it’s archive,php file it mentions this web address. The default theme used for the website is Twenty Eleven.

    When I go to the ftp directory of wp-content/themes these are the themes that appear there:

    put
    twentyeleven
    twentyfourteen
    twentyten
    twentythirteen
    twentyteleve

    I then see an index.php file.

    All the themes have their own folders. Put’s 404.php file has a line of code referencing the twentyten theme: <p><?php _e( ‘Apologies, but the page you requested could not be found. Perhaps searching will help.’, ‘twentyten’ ); ?></p>

    Yes I think put is from codex.wordpress.org the index.php file also references that site for put.

    The file you posted is not wp-admin/includes/update.php. My copies of that file are entirely different.

    You notice the hack on the error page. You have been hacked. Sorry but you need to address that now as it is the cause of your problem.

    You need to start working your way through these resources:

    http://codex.wordpress.org/FAQ_My_site_was_hacked
    http://wordpress.org/support/topic/268083#post-1065779
    http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/
    http://ottopress.com/2009/hacked-wordpress-backdoors/
    Additional Resources:

    http://sitecheck.sucuri.net/scanner/
    http://www.unmaskparasites.com/
    http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.html

    The theme you are using is not in our theme directory. It is likely someone customized 2011 but custom themes are not supported on this forum. Try switching to 2014 by renaming the other themes, theme-old and see if the site will work for you.

    Thread Starter maneeshpangasa

    (@maneeshpangasa)

    Alright thanks for that information. I just ran the sitecheck.succuri.net/scanner and it found no malware even though there are spam links on the site for Cialis and Viagra. FYI I do not think that re-naming trick will work for me. I was able to re-name one of the folders for theme twentyeleven to theme-old as you suggested but if I try to rename any others I get a name exists error.

    I was going to leave the twentyfourteen one intact and just rename the others as theme-old but I could only rename one theme with that name. Thanks for the tips I’ll just have to take my time and figure this out. Also trying to find out how the spam links got in the site.

    This theme-old, means the actual theme name and then-old.

    Sorry.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Parse Error on Login Page’ is closed to new replies.