WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: FeedList] Doesn't work with PHP 5 (14 posts)

  1. Stuarts
    Member
    Posted 6 years ago #

    I just upgraded to PHP 5.

    Feedlist immediately broke.

    The error was:

    Warning: Attempt to assign property of non-object in /home/mysite/public_html/wp-includes/rss.php on line 440

    Seems to be a bug in PHP 5.2 and 5.3 referenced here:

    You may want to fix this as PHP 4 will no longer be supported from Aug 2008.

    Regards,

    Stuart

    http://wordpress.org/extend/plugins/feedlist/

  2. Stuarts
    Member
    Posted 6 years ago #

    Little update on this.

    The above problem is fixed if you ask your host to install cURL support on your PHP 5 install.

    It seems it tends to be on PHP 4 installs, but not on the standard PHP 5 install.

    When my hosts added this, feedlist worked fine again without any modifications.

  3. Stuarts
    Member
    Posted 6 years ago #

    Spoke too soon on this one.

    It seems its an endemic problem with wordpress that is simply exacerbated by a switch to PHP 5.

    As it cropped up in another blog.

    My host had a search around and found the real solution on this thread here:

    http://wordpress.org/support/topic/120549?replies=8

    Nickel kindly volunteered the following solution in that thread that worked for me on all my blogs when I implemented it.

    Go to /home/yoursite/public_html/wp-includes/rss.php

    On line 440 (of rss.php), change this:

    if ( isset($rss) and $rss ) {

    to this:

    if ( isset($rss) && (is_object($rss) ||(is_string($rss) && $rss=unserialize($rss))) ) {

    ie It would then look like this in the code:

    //if ( isset($rss) and $rss ) {
    if ( isset($rss) && (is_object($rss) ||(is_string($rss) && $rss=unserialize($rss))) ) {

    That worked great.

  4. danahuff
    Member
    Posted 6 years ago #

    I was having the same problem with RSS widgets in my sidebar, and this fix worked. Thanks for posting!

  5. Robocopper
    Member
    Posted 5 years ago #

    I have the same problem with this feed on WP 2.60:

    http://feeds.feedburner.com/AlbertMohlersBlog

    Warning: Attempt to assign property of non-object in /home/thinking/public_html/talk/wp-includes/rss.php on line 440

    My PHP version on Hostgator is 5.2.6.

    I shall try this fix. Many thanks 4 posting it!!!

  6. Robocopper
    Member
    Posted 5 years ago #

    Ok, i can confirm that this fix looks good. It has been implemented on several sites and it works in each case.

  7. finalcut
    Member
    Posted 5 years ago #

    thanks everyone for identifying the problem and finding a solution to it.

    I will include a patched version of rss.php in the feedList release so that folks who experience this problem can apply the fix if necessary.

    Cheers,
    Bill

  8. peterhw
    Member
    Posted 5 years ago #

    I haven't tried any of the above remedies yet. I have the same problem. The blog below should show 2 x RSS feeds one is ok the other isn't. Does this suggest a different problem.

    Warning: Attempt to assign property of non-object in
    /home/ppppppppp/public_html/toolbox/NewsB/wp-includes/rss.php on line 440

    I have around 10 similar feeds all created from same data and all just created in the last few days with Worpress v 2.6.2

    some seem OK and some give the above error message.

    This code is already inserted in my installation

    //if ( isset($rss) and $rss ) {
    if ( isset($rss) && (is_object($rss) ||(is_string($rss) && $rss=unserialize($rss))) ) { $rss->from_cache = 1;
    if ( MAGPIE_DEBUG > 1) {

    http://toolbox.best-one.info/NewsB/

    This blog has 2 feeds - 1 feed gets the message and the other doesn't. I don't understand too much about the files but I loaded rss.php into Excel and line 440 appeared to be checking for a cache file

    Any help / ideas appreciated

  9. elliottgoodwin
    Member
    Posted 5 years ago #

    The fix worked great. Thanks!

  10. n03lm
    Member
    Posted 5 years ago #

    I've just upgraded to wordpress 2.7 - I've found that the bug fix mentioned above and in

    http://wordpress.org/support/topic/147613?replies=4
    http://wordpress.org/support/topic/120549?replies=8

    has had to be applied to every update of wordpress for quite a while. IT has worked every time before. However this time the above fix doesn't work and all I get is the RSS feed header as the widget title and no items. Oddly enough the RSS feed in question is coming from another wordpress blog !
    http://www.npci.org.uk/blog/index.php?feed=rss2

    The code produced looks like this

    <li id="rss-2" class="widget widget_rss"><h2 class="widgettitle"><a class='rsswidget' href='http://www.npci.org.uk/blog/index.php?feed=rss2' title='Syndicate this content'><img style='background:orange;color:white;border:none;' width='14' height='14' src='http://healthalerts.org.uk/wp-includes/images/rss.png' alt='RSS' /></a> <a class='rsswidget' href='' title=''>National Prescribing Centre Blog</a></h2>
    </li>
    <li id="rss-214713071" class="widget widget_rss"><h2 class="widgettitle"><a class='rsswidget' href='http://www.nhs.uk/NHSChoices/shared/RSSFeedGenerator/RSSFeed.aspx?site=News' title='Syndicate this content'><img style='background:orange;color:white;border:none;' width='14' height='14' src='http://healthalerts.org.uk/wp-includes/images/rss.png' alt='RSS' /></a> <a class='rsswidget' href='http://www.nhs.uk/News/Pages/NewsArticles.aspx' title='RSS Feed for NHS Choices News pages'>NHS Choices: Behind the headlines</a></h2>
    <ul><li><a class='rsswidget' href='http://www.nhs.uk/news/2009/01January/Pages/Menopauseherbalremedies.aspx' title='The Daily Mail reported today that herbal remedies to treat menopausal symptoms are unproven and could actually damage health. The newspaper said that an independent review by experts has found no strong evidence that herbal remedies such as ginseng, black cohosh and red clover have any effect on the hot flushes, sleeplessness and loss of libido associated w [&hellip;]'>Dangers of herbal cures</a> <span class="rss-date">14 January 2009</span></li>
    </ul>

    which as you can see misses the href link and title for the acutal feed. Whereas the feed below it displays perfectly.

    Any suggestions ?

  11. n03lm
    Member
    Posted 5 years ago #

    I've just upgraded to wordpress 2.7 - I've found that the bug fix mentioned above and in

    http://wordpress.org/support/topic/147613?replies=4
    http://wordpress.org/support/topic/120549?replies=8

    has had to be applied to every update of wordpress for quite a while. IT has worked every time before. However this time the above fix doesn't work and all I get is the RSS feed header as the widget title and no items. Oddly enough the RSS feed in question is coming from another wordpress blog !
    http://www.npci.org.uk/blog/index.php?feed=rss2

    The html produced looks like this

    <li id="rss-2" class="widget widget_rss">
    <h2 class="widgettitle">
    <a class='rsswidget' href='http://www.npci.org.uk/blog/index.php?feed=rss2' title='Syndicate this content'>
    <img style='background:orange;color:white;border:none;' width='14' height='14' src='/wp-includes/images/rss.png' alt='RSS' /></a>
    <a class='rsswidget' href='' title=''>National Prescribing Centre Blog</a></h2>
    </li>
    <li id="rss-214713071" class="widget widget_rss">
    <h2 class="widgettitle">
    <a class='rsswidget' href='http://www.nhs.uk/NHSChoices/shared/RSSFeedGenerator/RSSFeed.aspx?site=News' title='Syndicate this content'>
    <img style='background:orange;color:white;border:none;' width='14' height='14' src='/wp-includes/images/rss.png' alt='RSS' /></a>
    <a class='rsswidget' href='http://www.nhs.uk/News/Pages/NewsArticles.aspx' title='RSS Feed for NHS Choices News pages'>NHS Choices: Behind the headlines</a></h2>
    <ul>
    <li><a class='rsswidget' href='http://www.nhs.uk/news/2009/01January/Pages/Menopauseherbalremedies.aspx' title='The Daily Mail reported today that herbal remedies to treat menopausal symptoms are unproven and could actually damage health. The newspaper said that an independent review by experts has found no strong evidence that herbal remedies such as ginseng, black cohosh and red clover have any effect on the hot flushes, sleeplessness and loss of libido associated w [&hellip;]'>Dangers of herbal cures</a>
    <span class="rss-date">14 January 2009</span></li>
    </ul>

    which as you can see misses the href link and title for the actual feed. Whereas the feed below it displays perfectly.

    Any suggestions ?

  12. uddhava
    Member
    Posted 5 years ago #

    Encountered the same problem and tried to apply the fix.
    I found out that you need to edit the rss.php in the wp-includes folder.
    There is another one in /root. No use editing this one.

    So edit -> wp-includes/rss.php

    A few other funny things i encountered (without this fix)
    1) the first feed gets displayed correctly. A 2nd does not
    2) the error sometimes appears, and sometimes it works.
    This has something to do with the caching of rss feeds i guess.
    3) the refresh speed has increased dramatically. The page loads super fast now....

  13. Robocopper
    Member
    Posted 5 years ago #

    uddhava,

    I have found exactly the same. First is ok, second is broken, third onwards are ok. This is on 2.7.1 btw.

  14. jpacca
    Member
    Posted 5 years ago #

    Hi

    I receently installed a rss plug in Feed Statistics by http://www.chrisfinke.com/

    When i done this in microsoft outlook the links in my posts no longer worked

    So i deactived the plugin

    Now my rss feeds are not coming through to my subsribers when i add a new post

    in microft outlook i deleted my feeed and re added the feed http://www.myonlineshoppinguk.com/feed/

    But as my subscibres say my feeds no longer are coming through

    Please can you help as my business seems to now be worthless

    I really hope you can help

    Thanks

    John-Paul

    http://www.myonlineshoppinguk.com

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags