Results 1 to 15 of 15

Thread: stream errors on moving host

  1. #1
    Join Date
    Jul 2009
    Posts
    7

    Default stream errors on moving host

    Hi
    I recently moved an install but I am getting errors on the rss feeds like:

    Warning: fopen(/home/domain/public_html/cache/rss_b4c910d419f6eb239b9cb44adcfe5ca6.cache) [function.fopen]: failed to open stream: Permission denied in /home/advertis/public_html/lib/rss.class.php on line 78

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/domain/public_html/lib/rss.class.php on line 79

    could anyone help me out with it?
    thanks
    Al

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    delete the RSS cache and make sure that the cache dir is writeable.

    You can delete all files in /cache/ and then chmod the directory to 777

  3. #3
    Join Date
    Jul 2009
    Posts
    7

    Default

    ok that removed the errors thanks but the feeds under top news story are showing html etc and arent formatted correctly
    can I PM you the url for you to check?

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    If it really needs to be private, then yes, otherwise you can post the url here. No adult URL's are allowed on the forum.

    I mentioned that you should chmod the /cache/ directory to 777, but if your server runs suPHP then it shouldn't be at 777. I neglected to mention this earlier. The only way you'll know if you run suPHP is to check yoururl.com/admin/phpinfo.php or to ask your host.

    If you do run suPHP then chmod /cache/ back to 755.

  5. #5
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    The issue you're seeing is the RSS feeds fault, and there's nothing you can do about it.

    #60;p>#60;a href=" is the same (in html code) as <p><a href=" but the rss feed doesn't parse HTML code, it only passes it along.

    I would suggest changing the feed to a proper news feed that doesn't munge code such as AP or Google News.

  6. #6
    Join Date
    Jul 2009
    Posts
    7

    Default

    ok thanks
    do I change the feed in admin or do I have to change a file?

  7. #7
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Go to the template editor in admin and change whatever file you need to, probably index.html and/or footer.html

  8. #8
    Join Date
    Jul 2009
    Posts
    7

    Default

    ok I found the rss link in index
    I am not sure which format to put in the though as I check the AP feeds:
    News from The Associated Press
    and took the url for the top news and its showing the feeds but giving me errors and when I click the news item it doesnt display:

    Warning: fopen(/home/advertis/public_html/cache/rss_7c203e532b4f611c5c7886f3ba1c2179.cache) [function.fopen]: failed to open stream: Permission denied in /home/domain/public_html/lib/rss.class.php on line 78

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/domain/public_html/lib/rss.class.php on line 79

    Warning: fclose(): supplied argument is not a valid stream resource in /home/domain/public_html/lib/rss.class.php on line 80

  9. #9
    Join Date
    Jul 2009
    Posts
    7

    Default

    can someone give me a feed which will work please?

  10. #10
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Quote Originally Posted by discover View Post
    can someone give me a feed which will work please?
    Here is the AP World News feed:

    AP Top International News At 9:40 p...
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  11. #11
    Join Date
    Jul 2009
    Posts
    7

    Default

    yea the news items are showing but im still getting these errors on the main page

    Warning: fopen(/home/domain/public_html/cache/rss_8857ccd735b232c2f1f3c37fa5f68a58.cache) [function.fopen]: failed to open stream: Permission denied in /home/domain/public_html/lib/rss.class.php on line 78

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/domain/public_html/lib/rss.class.php on line 79

    Warning: fclose(): supplied argument is not a valid stream resource in /home/domain/public_html/lib/rss.class.php on line 80

  12. #12
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Quote Originally Posted by discover View Post
    yea the news items are showing but im still getting these errors on the main page

    Warning: fopen(/home/domain/public_html/cache/rss_8857ccd735b232c2f1f3c37fa5f68a58.cache) [function.fopen]: failed to open stream: Permission denied in /home/domain/public_html/lib/rss.class.php on line 78

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/domain/public_html/lib/rss.class.php on line 79

    Warning: fclose(): supplied argument is not a valid stream resource in /home/domain/public_html/lib/rss.class.php on line 80

    Your /cache directory is not writeable. Thats why your seeing these errors. Bruce mentioned it earlier:

    1 - If your webserver isn't running suPHP than the directory needs to be 777

    2 - If your webserver IS running suPHP than the directory needs to be 755.

    Some web hosting companies wont allow users to make a subfolder writable. You might also want to check with your host and ensure that isn't your problem as well.

    But there is no doubt in my mind that your cache folder is currently not able to be written to!
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  13. #13
    Join Date
    Jul 2009
    Posts
    7

    Default

    I definitely set the cache folder to 777 but I just checked and it was at 755 again
    I think my host must have changed it back so ill get in touch with them and see why
    good news is the feeds are working now
    thanks for your help

  14. #14
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Alot of host run nightly scripts to find directories with 777 and automtically change them to 755.

    Just in case anyone was wondering... No! My company doesn't do that
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  15. #15
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Delete all of the files in the cache directory. The issue is probably file ownership.

    The files in /cache/ should be owned by the script, not by the user. If you uploaded the site via FTP to the new host those files would be user owned.

Similar Threads

  1. "Failed to open stream" error
    By Smak in forum INDEXU DELUXE v1.x
    Replies: 2
    Last Post: 12-06-2008, 11:49 AM
  2. Replies: 9
    Last Post: 09-25-2008, 06:39 AM
  3. Moving to new host.
    By marian in forum v5.x
    Replies: 22
    Last Post: 03-27-2008, 10:09 PM
  4. host question
    By piet in forum Help Wanted/Job Request
    Replies: 7
    Last Post: 02-02-2008, 10:07 PM
  5. Web Host Imm.com.au
    By jwnes in forum Website development, hosting and promotion
    Replies: 1
    Last Post: 03-06-2003, 05:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •