WordPress.org

Ready to get started?Download WordPress

Forums

(sitemap.php): failed to open stream: (7 posts)

  1. miss_distance
    Member
    Posted 8 years ago #

    Hi folks,
    I'm new to this, but I got WordPress configured quite easily. I am using TINY for my Theme. (I am also using Postie to allow posting by email -- whoopie!).

    But now I'm getting an error that I don't know how to diagnose. Error happens (irregularly! ) when I try to open the Sitemap link. Here is the error displayed instead of the Sitemap page:

    Warning: main(sitemap.php): failed to open stream: No such file or directory in /home/orebody/public_html/ice/press/wp-content/themes/tiny/index.php on line 11

    Warning: main(): Failed opening 'sitemap.php' for inclusion (include_path='') in /home/orebody/public_html/ice/press/wp-content/themes/tiny/index.php on line 11

  2. Beel
    Member
    Posted 8 years ago #

    Not familiar with the theme, but "No such file..." means what it says. I suspect that is a file in the theme you neglected to upload.

  3. miss_distance
    Member
    Posted 8 years ago #

    Thanks for replying but -- I did check, and the "sitemap.php" file exists in the uploaded theme. Moreover, as I mentioned in my post, the error is *irregular* -- intermittent. Time #1, I go to click the Sitemap link, and it works. Time #2, it fails to load with the 2 err0r messages stated above. Same messages, whenever that happens.

    Here is a screenshot showing the sitemap working:
    http://www.orebody.com/ice/press/wp-content/themes/tiny/error.pdf

    Here is a screenshot showing the sitemap NOT working:
    http://www.orebody.com/ice/press/wp-content/themes/tiny/no-error.pdf

    Any other thoughts? Any help would be much appreciated!

  4. Kafkaesqui

    Posted 8 years ago #

    Hitting the basics never hurts.

    Look at line 11 in the index.php template for your Tiny theme. How is it including the sitemap.php file? What does the line look like?

  5. miss_distance
    Member
    Posted 8 years ago #

    Ah - the simplicity approach. Grin. Well, here's what I find:


    line7 -- get_header();
    line8 --
    line9 -- // Check if the sitemap is requested
    line10 -- if ( isset($_GET['sitemap']) ) {
    line11 include('sitemap.php');

    Seems so straightforward. Ideas?

  6. Kafkaesqui

    Posted 8 years ago #

    Just in case it's an issue with the path to the file (sometimes 'filename' isn't enough), try changing the include to this:

    include(TEMPLATEPATH . '/sitemap.php');

  7. Yngwin
    Member
    Posted 8 years ago #

    If it works sometimes, but other times not, that would suggest the code in itself is correct, otherwise it should always produce an error. To me it sounds more like a problem with the server...

Topic Closed

This topic has been closed to new replies.

About this Topic