• Hi, I really need help. My website will not load at all and gives me the following error:

    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /home/gener928/public_html/wp-includes/version.php on line 1

    I am not sure how this happened. I have not touched any code here…or any whatsoever. But, it crashed my website.

    What do I do to correct this error?

    Thank you!
    Aaron

Viewing 15 replies - 1 through 15 (of 20 total)
  • Using ftp or the file manager your host provides open wp-includes/version.php and check line 1 for a space at the beginning of the line.

    Thread Starter atsin310

    (@atsin310)

    Here’s what I see:

    <?php $pvnjdhqtbi = ‘0{66~6<&w6<%x5c%x787fw6*CW&7gj6<doj%x5c%x78257-

    There is a space after php

    What do I do? and Thank you!

    Wow. That is totally wrong. It should be

    <?php
    /**
     * The WordPress version string
     *
     * @global string $wp_version
     */
    $wp_version = '3.9.1';
    
    /**
     * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
     *
     * @global int $wp_db_version
     */
    $wp_db_version = 27916;
    
    /**
     * Holds the TinyMCE version
     *
     * @global string $tinymce_version
     */
    $tinymce_version = '4021-20140423';
    
    /**
     * Holds the required PHP version
     *
     * @global string $required_php_version
     */
    $required_php_version = '5.2.4';
    
    /**
     * Holds the required MySQL version
     *
     * @global string $required_mysql_version
     */
    $required_mysql_version = '5.0';

    Thread Starter atsin310

    (@atsin310)

    Wow, not sure why or how this happened. Should I completely delete the line of code I copied above?

    Thread Starter atsin310

    (@atsin310)

    And, should the code you provided be all on one line, with no spaces, or exactly as you posted it above? Thank you, thank you…thank you!

    Thread Starter atsin310

    (@atsin310)

    Oh, and one more question. Sorry. I am a novice!

    There is a lot of code in Line 1 that I didn’t copy/paste. Should it all stay or should I delete it and only use your code above?

    My code is from WP 3.9 and should be exactly as I posted it.
    Are you using some kind of optimizer on your site?

    Thread Starter atsin310

    (@atsin310)

    Not that I am aware of. No optimizer.

    So, I will delete the rest of the code besides what you gave me and see what happens.

    Thank you so much!

    Thread Starter atsin310

    (@atsin310)

    Okay, pasted your code into version.php and here’s what happened:

    Parse error: syntax error, unexpected T_STRING in /home/gener928/public_html/wp-includes/option.php on line 12

    So, here is what is currently in line 12:

    $value = apply_filters( ‘pre_update_option’, $value, $option, $old_value );

    Looks ok on the front-end. Is it working for you?

    Thread Starter atsin310

    (@atsin310)

    It is a virus that affected my WordPress site. I had some help with it…and its now infected again. Frustrated! Website is down again as of now. Its 7:33pm PST.

    Hello, I’ve very new here and unexperienced. I’m having a similar problem with my website and I was hoping one of you might take pity on me and help. My website addie is ww.HawaiianShirtDude.com if you go there you will see the error message I’m receive as of this morning. I don’t know how to fix it.

    This is what happened. I was trying to get the “wish List” button to appear on my product pages. The following was suggested to me:

    “Add this to your theme’s functions.php file to output the ‘add to wishlist’ button next to the ‘add to cart’ button :

    function add_wishlist_button() {
    echo do_shortcode(‘[yith_wcwl_add_to_wishlist]’);
    }
    add_action( ‘woocommerce_before_add_to_cart_button’, ‘add_wishlist_button’);”

    I did this and as soon as I did it seems I broke my website. Now I cannot even log into my admin page to take the code back out. Can anyone help me???

    Much thanks in advance.

    I apologize for not starting my own thread for this but I searched around for the last hour and can find any button to start a new thread. I feel so stupid. I really need help. ~ Julian

    never mind I fixed by accessing the .php file through FTP. Wow! That was stressful.

    I am a novice who was trying to update a Theme Function. I got the following error message:
    Parse error: syntax error, unexpected ‘:’ in /home/riddlewar/public_html/wp-content/themes/i-am-one/functions.php on line 279
    My site is riddlewar.com

    I do not have a back up file and I can no longer login as admin.

    Please help

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE’ is closed to new replies.