WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Parse Error in post.php (14 posts)

  1. dragolux
    Member
    Posted 6 years ago #

    Hello everyone,

    I just installed WordPress on my website, and when I go to the /wp-admin/install.php page, I get this error:

    Parse error: parse error, unexpected ':', expecting T_VARIABLE or '$' in .../Wordpress/wp-includes/post.php on line 856

    Any help? I would really like to get this working, so any help would be really appreciated.

    Thanks!

    Dragolux

  2. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    Something dropped a character in your file that does not make sense. Delete all the files in your WordPress directory. FTP them again (make sure you are FTPing in ASCII).

  3. dragolux
    Member
    Posted 6 years ago #

    I tried uploading everything again in ASCII, but that didn't work. I'll try downloading a fresh copy and doing it again.

    By the way - what FTP should I be using? I'm using WS_FTP LE 6.0. Should I try a different one, or does it not matter?

    Thanks!

  4. dragolux
    Member
    Posted 6 years ago #

    Ok, I tried downloading a fresh copy, and installing it again, but it still doesn't work! I see the post.php file on my computer, and it's fine - line 856 is clean. On my computer, it looks like this:

    $tags = (is_array($tags)) ? $tags : explode( ',', $tags );

    But when I view it on the server, it looks like this:

    $tags = (is_array($tags)) ? $ : plode( ',', $tags );

    So it must have something to do with uploading it. How can I fix this?

  5. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    Did you delete all the files and directories in your WordPress folder? I may be seeing 2 style.css files.

    I don't think it matters which FTP you use. After you FTP you should go to your site admin and check to see if the files you FTP'd are indeed there.

    BTW, there is a line 856 and there is a $. There should not be a :

  6. dragolux
    Member
    Posted 6 years ago #

    I think you missed my above comment. Read the post right above your last one.

  7. whooami
    Member
    Posted 6 years ago #

    upload in ascii, not binary.

  8. dragolux
    Member
    Posted 6 years ago #

    I did that. But it still is doing something to the code.

  9. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    You could open the file on the server and fix the error there. I think you will just get additional errors that don't show now as it stops at the first parse problem. Still, that may be worth a try.

    I know of nothing that will change code in FTP unless somewhere "auto" or "binary" is set. Maybe it wouldn't hurt to use a different FPT program. Do you have Firefox? You could try FireFTP.

  10. dragolux
    Member
    Posted 6 years ago #

    I deleted/uploaded everything again, this time using FireFTP, but the same thing happened.

    By the way, how do I edit something on the server in FireFTP? Do I just right click on it and go to Open With...Notepad? Then how do I save it?

  11. whooami
    Member
    Posted 6 years ago #

    you dont need to edit files that way -- you seemingly havent mastered editing files as they sit on your desktop. :P (Besides, this is a WP support forum-- not a windows application help site)

    Seriously, this isnt rocket science.

    delete the directory of WP files that are on your desktop.

    Unpack the zip again, recreating the folder and the files that you just deleted.

    Download your wp-config.php and put it inside the folder on your desktop that contains wp-config-sample.php.

    Delete all the WP files off your server.

    Upload new files in ascii.

  12. dragolux
    Member
    Posted 6 years ago #

    Lol, I know this isn't "rocket science", so I should be able to do it, right? I did everything exactly the way you said, and it still shows this error:

    Parse error: parse error, unexpected ':', expecting T_VARIABLE or '$' in /homepages/5/d132483652/htdocs/tutorial_wow/Wordpress/wp-includes/post.php on line 856

    I could try downloading it again and doing the whole thing over, but this is getting kind of boring...

  13. whooami
    Member
    Posted 6 years ago #

    If you email me your ftp info, I will upload WP for you

    whoo AT-------- whoo.org ----

  14. dragolux
    Member
    Posted 6 years ago #

    I just solved the problem! It just so happens that I have an internet filter on my computer that's too good. :) And it took out some of the words in the code. (they weren't bad words, it was just the way the code was set up.) When I took the filter off, it worked fine!

    Thanks for all your help!

Topic Closed

This topic has been closed to new replies.

About this Topic