Skip to main content
Inspiring
May 26, 2006
Question

CFM files not found by browser

  • May 26, 2006
  • 3 replies
  • 1277 views
We are running ColdFusion MX 7 on a Solaris platform. The version is 7,0,0,91690. We are using Apache for the web server. Let me know if you need additional information.

We're having a very weird problem. I have searched these forums and found no one else with a similar complaint and so I hope someone could give us a hand with this.

In the normal process of editing a CFM page and then testing it in a browser, we randomly but consistantly find that some files gives a "File Not Found" 404 error. But the file actually exists on the server, the permissions are correct, it can be opened and viewed by the Unix command line and within Dreamweaver, and the URL to it is correct. This behaviour does not occur with any non-CFM file.

It is always the case that the file was working fine earlier. But once it occurs and we see the 404 error, no modification made to the file makes any difference except for renaming it to something different. Using the "touch" Unix command does not help and so it does not seem to be associated with date or time of the file.

In addition to the above weirdness; once we have renamed the problem file to something else and can then view it in a browser, duplicating that file and renaming the copy to the original name causes the duplicat to throw the 404 error and act exactly like the original. And so it doesn't seem to be directly associated with the file itself, but the name of the file.

As I mentioned above, this seems to appear randomly - we can't reproduce it. It is also not very widespread, it is only a few scattered files in completely different locations on the server. We have racked our brains and found no correlation between the problem files that could tie them together.

Any ideas or tips that would help us debug the behaviour would be very much appreciated. Thanks in advance for your help.

    This topic has been closed for replies.

    3 replies

    jamesmdAuthor
    Inspiring
    August 1, 2006
    Unfortunately this bug has returned with a vengance.

    The error mentioned above (File not found) has cropped up with the majority of our ColdFusion templates. This has made a good portion of our site unusable. It has also stopped dead all work on a new program with a tight deadline. This is a serious problem we need to fix immediately.

    The fix mentioned in the talkingtree.com site used to work as is shown by my last post. Now it doesn't. I have no idea why there is a change. All attempts to alter the Administrator's setting, using the cfscript code, etc have done nothing to change it.

    Please, if there is any true fix to this problem, I would kindly ask you to send it my way. I am rather desparate for a solution.
    Gary__F
    Inspiring
    May 28, 2006
    Try going to the CF Admin / caching page and click on the clear template cache button. Does that make any difference?

    If so, there is a known bug with CF but won't be fixed for a while. It's causing us no end of trouble. It sucks big time. See this blog: http://www.talkingtree.com/blog/index.cfm/2006/2/20/Improper-Caching-of-File-not-found
    Inspiring
    May 26, 2006
    Is it with all CFM files or just certain ones? When you rename the file, are you changing the extension, or keeping it CFM?

    I know you can have this issue if their is no proper MIME type setup on the server - it happened to us in Win2003 once.
    jamesmdAuthor
    Inspiring
    May 30, 2006
    It seems to be with just certain ones. And I am keeping the CFM extension when I rename the files.

    Gary_F, thank you! Your advice was spot on. And I agree - it definitely sucks big time.

    For those who have similar problems, follow the link above. The trouble, at least in my case, was that ColdFusion cached a 404 File Not Found error page as the template to show for a CFM file because there was previously a 404 error thrown for that specific file. The problem can be reproduced by following this:
    1) create a CFM file
    2) browse to it
    3) then change the name of the file
    4) browse to the original name to cause a 404 error (refresh the same page)
    5) rename the file back to its original name
    6) refresh the same page again to see that the 404 error still persists even though the file name and URL are correct.

    Following the advice in the blog linked above fixed our problems with this bug. Thanks for your help everyone, it is appreciated.