WordPress.org

Ready to get started?Download WordPress

Forums

Parse error: syntax error, unexpected T_STRING (16 posts)

  1. johnwiese
    Member
    Posted 1 year ago #

    was on a roll figuring out code improvements and then something messed
    up and it's really frustrating.

    i had cut something out of functions.php and updated and got this error:

    Parse error: syntax error, unexpected T_STRING in
    /home/johnwiese/john-wiese.com/zine/wp-content/themes/twentyten/functions.php
    on line 472

    before i did this, i had copied the whole thing, so i tried to paste it back in and
    when i hit update i got the same error.

    now i can't even get to the editor or any page whatsoever, i only get
    that error.

    i tried emptying my cache, i tried viewing on a different browser.

    i've searched for advice but it's all way over my head and i seem to be completely locked out of everything.

    i would appreciate any help anyone could lend me.

    i don't know the version of wp i'm using because i can't get to any page that might tell me... my theme is twenty ten...

    http://www.john-wiese.com/zine/

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Don't edit the Twenty Ten theme. First create a child theme for your changes. Then re-upload a fresh copy of Twenty Ten to wp-content/themes using FTP or whatever file management application your host provides.
    http://wordpress.org/extend/themes/twentyten

  3. johnwiese
    Member
    Posted 1 year ago #

    thanks for the reply.

    i'll attempt the child theme later...

    i downloaded twentyten again from your link and copied the files over to replace everything in wp-content/themes using ftp. and now i get this error:

    Fatal error: Call to undefined function add_action() in /home/johnwiese/john-wiese.com/zine/wp-includes/functions.php on line 51

    i get this error even when i try to go to my admin page:
    http://www.john-wiese.com/zine/wp-admin/

  4. johnwiese
    Member
    Posted 1 year ago #

    is it necessary that i create the child theme first? isn't replacing the twentyten theme removing all of my previous changes anyway?

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    copied the files over to replace everything in wp-content/themes using ftp

    What exactly is inside your wp-content/themes folder?

  6. johnwiese
    Member
    Posted 1 year ago #

    the same list of files which was in the twentyten theme i downloaded from your link...

  7. esmi
    Forum Moderator
    Posted 1 year ago #

    Nooo! Delete all of those file and re-upload the unpacked Twenty Eleven and Twenty Ten them folders to wp-content/themes.

  8. johnwiese
    Member
    Posted 1 year ago #

    ok, i did that, and am still getting this:

    Fatal error: Call to undefined function add_action() in /home/johnwiese/john-wiese.com/zine/wp-includes/functions.php on line 51

    i emptied my cache and tried another browser to make sure it wasn't that.

    just to be clear: i went into the themes folder, deleted the twentyten and twentyeleven folders, then added the unzipped ones i just downloaded from wp.

  9. esmi
    Forum Moderator
    Posted 1 year ago #

    Try re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

  10. johnwiese
    Member
    Posted 1 year ago #

    ok, trying to do this, but i can't get past this while trying to set it up:

    Error establishing a database connection

    i'm trying everything i can and just keep getting the same thing.

    what is my database name? "zine"? since my site is
    http://www.john-wiese.com/zine/
    ?

    is my username/password the ones i've been using to log in to this site all along?

    do i need to change the default "localhost" from the database host?

    likewise, "wp_" for table prefix?

  11. esmi
    Forum Moderator
    Posted 1 year ago #

    We don't have you database details, You'll need to check them with your hosts.

  12. johnwiese
    Member
    Posted 1 year ago #

    ok, but if my site is on my ftp is in a folder called "zine", and it's found at the following link: http://www.john-wiese.com/zine/, would that indicate that "zine" is the name of my database? i don't know of any other way to figure this out. my host is dreamhost and i just looked around in that admin and can't find anything that might indicate my "database details"...

    thank you for walking me through this. if i could

  13. esmi
    Forum Moderator
    Posted 1 year ago #

    would that indicate that "zine" is the name of my database?

    Not necessarily. Your database name could well be completely unrelated to your domain name. Try contacting Dreamhost directly for assistance with this.

  14. johnwiese
    Member
    Posted 1 year ago #

    ok, i reinstalled wp but all my posts are missing now.

  15. johnwiese
    Member
    Posted 1 year ago #

    you might mention to backup before doing something like that. i thought your suggestion of saving my contents folder was taking care of it. i didn't realize i would loose my 1,077 posts in the process.

  16. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    ok, i reinstalled wp but all my posts are missing now.

    You shouldn't unless you removed your database. Just copying the files over will not delete your posts!

    I took a look at your SQL dbs: https://panel.dreamhost.com/index.cgi?tree=goodies.mysql&

    I see that you have three DBs, and they're all created as of May 2012, so I would presume the zine DB is the one you want. I would take a look in there and make sure your post content is still there, and if so, just edit the wp-config.php to point back to that DB :) If you need help with that, please open up a ticket and we can help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags