WordPress.org

Ready to get started?Download WordPress

Forums

Files | Manage broken after upgrade (10 posts)

  1. shacker
    Member
    Posted 8 years ago #

    After upgrading to 2.0, all seems well, except that when I click Files in Manage menu I get:

    Parse error: parse error, unexpected '}' in
    /..path../wp-admin/templates.php on line 164

    Not sure where to begin troubleshooting this one, thanks.

  2. moshu
    Member
    Posted 8 years ago #

    I always start with uploading a fresh version of the file mentioned in the error message. Files have the bad "habit" to get corrupted during upload :)

  3. shacker
    Member
    Posted 8 years ago #

    Well, this is interesting - decided to start totally fresh and removed the entire WP installation. Dropped all tables from the database (this is a brand new site so we had nothing to lose), and started from scratch with a virgin WP2 installation. Everything goes well, but the error above persisists. Same exact symptom.

    Could this be an incompatibility with a plugin?

  4. shacker
    Member
    Posted 8 years ago #

    Nope - just temporarily renamed the plugins dir -- the error persists. No one else is seeing this?

    The installation was unpacked from tarball directly on the server, so no chance of an upload error (and everything else works fine).

  5. ciqala
    Member
    Posted 8 years ago #

    i'm getting this exact same error.

    using a brand new install of wordpress from the current stable tarball as of about 3 hours prior to this post.

  6. sbstaskiewicz1
    Member
    Posted 8 years ago #

    I've come across the same error. I followed the upgrade directions exactly. I'm not sure what is causing this conflict.

    Are we the only people with this issue?

    What are you using your install for? Maybe we have a common issue (besides the current one). My install is located on a university web server that has some pretty tight limitations, but ran version 1.5.x fine.

  7. dzr
    Member
    Posted 8 years ago #

    Hi, I just wanted to add that I too am seeing this problem.

    $ uname -a
    Linux boson 2.6.10-1-k7-smp #1 SMP Fri Mar 11 04:38:08 EST 2005 i686 GNU/Linux

    $ php --version
    PHP 4.3.10-16 (cli) (built: Aug 24 2005 20:25:01)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

    I've just taken a look at templates.php and I can't see what the problem is. There is indeed a "}" on line 164 which closes "switch($action) {" on line 16. I can't see any errors in between those two lines.

    Nevertheless I too am getting "Parse error: parse error, unexpected '}' in /path/to/blog/wp-admin/templates.php on line 164"

  8. dzr
    Member
    Posted 8 years ago #

    Ah, I think I see the problem. My PHP installation is configured to not use short tags (because it messes up various XML things I use). That is, all PHP instructions must be included between "<?php " and "?>". In lines 89 and 91 of templates.php, there are two lines which use the short-form "<? " and "?>".

    Change these two lines:

    <? else: ?>

    and

    <?endif; ?>

    to:

    <?php else: ?>

    and

    <?php endif; ?>

    and see if that helps. It solves the problem for me.

  9. sbstaskiewicz1
    Member
    Posted 8 years ago #

    That did it. It looks as if it was a coding error on the developer's behalf. Line 91 of my code read:

    <?endif; ?>

    Which should have at least been coded as:

    <? endif: ?> (space before the endif)

    I never thought to go through line by line in the code to see if the PHP notation had changed. It's strange because every where else in the document, any PHP function is listed as:

    <?php some sort of code ?>

    Oh well. Thanks for the tip.

  10. shacker
    Member
    Posted 8 years ago #

    Upgrading to 2.01 fixed this problem for me.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags