• I’ve just installed WordPress and while everything else is working well, when I attempt to use RSS, I get this error message.

    “Parse error: parse error, unexpected $ in /virtual/users/e13071-12435/web/blog/wp-feed.php on line 33”

    I’m a newbie, but as far as I can tell, there are only 32 lines in this code – I’m totally lost. Any help would be appreciate.

    Cheers!

    <?php

    if (empty($doing_rss)) {
    $doing_rss = 1;
    require(dirname(__FILE__) . ‘/wp-blog-header.php’);
    }

    // Remove the pad, if present.
    $feed = preg_replace(‘/^_+/’, ”, $feed);

    if ($feed == ” || $feed == ‘feed’) {
    $feed = ‘rss2’;
    }

    if ( is_single() || ($withcomments == 1) ) {
    require(ABSPATH . ‘wp-commentsrss2.php’);
    } else {
    switch ($feed) {
    case ‘atom’:
    require(ABSPATH . ‘wp-atom.php’);
    break;
    case ‘rdf’:
    require(ABSPATH . ‘wp-rdf.php’);
    break;
    case ‘rss’:
    require(ABSPATH . ‘wp-rss.php’);
    break;
    case ‘rss2’:
    require(ABSPATH . ‘wp-rss2.php’);
    break;
    case ‘comments-rss2’:
    require(ABSPATH . ‘wp-commentsrss2.php’);

Viewing 9 replies - 1 through 9 (of 9 total)
  • A link to where we could see this happen would be useful.

    Which feed were you going after? Have you tried re-uploading a fresh/clean copy to the server of the applicable file required for that feed?

    Thread Starter waterdown

    (@waterdown)

    Thank you for the help!

    https://www.waterdownlabradors.com/blog

    I’ve uploaded a clean copy of the wp-feed.php file – I assume that’s the file needed.

    Well, the good news is that this work-around works: https://waterdownlabradors.com/blog/wp-rss2.php

    What’s odd about the error you’re getting is that line 32 refers to wp-commentsrss2.php. Which baffles me as that’s not what it should be looking for…

    But for grins, try uploading a fresh copy of that one as well?

    Thread Starter waterdown

    (@waterdown)

    Thank you again – I very much appreciate the help. Tried uploading a new copy and still no luck. Is there somewhere that tells me how to flip the RSS feed to the new URL?

    Cheers!

    Out of curiosity, does the problem persist if you switch themes? Perhaps to classic or default?

    Thread Starter waterdown

    (@waterdown)

    Thanks for another great idea. Unfortunately, yes, it does. I tried 3 different themes with no luck. Ah well – sometimes things just aren’t meant to work ??

    Happy New Year!

    Try to overwrite wp-rss2.php from the original zip of wordpress…

    If I had to guess, I’d say there’s definitely a “corrupted” file somewhere in your install.

    One option would be to re-upload the files in the blog root directory. Make sure your ftp client is in text or ascii mode.

    Another option would be to modify your theme file to hard code in the known/working feed link. I’m not all that familiar with your theme, but I imagine that if you peeked in your sidebar.php, in the “meta” section towards the bottom, you’d find a line something like:

    <a href="<?php bloginfo('rss2_url'); ?>">Entries RSS</a>

    replace it with

    <a href="https://waterdownlabradors.com/blog/wp-rss2.php">Entries RSS</a>

    maybe?

    Thread Starter waterdown

    (@waterdown)

    Thank you both for your ideas. I tried downloading an entire new script from the wordpress website and uploading again, with still no luck.

    With Handysolo’s instructions, I was able to go in and modify the links and I’m now away to the races. Your instructions were great – I was even able to figure out myself how to fix the rsscomments link from them ??

    Thank you very much. Your help was fantastic.

    Cheers!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘RSS not working – parse error’ is closed to new replies.