Title: errors when leaving comments
Last modified: August 18, 2016

---

# errors when leaving comments

 *  [inthepink](https://wordpress.org/support/users/inthepink/)
 * (@inthepink)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-leaving-comments/)
 * I’ve had several people let me know that they get the following error when leaving
   comments:
 * Error: This file cannot be used on its own.
 * The site is: [http://www.inthepinktexas.com](http://www.inthepinktexas.com)
 * In the two cases where I know the browser – it was firefox.
 * I have not been able to replicate the issue in firefox or IE. the people having
   problems have sometimes been able to post a comment if someone else already has.
 * any ideas? I couldn’t find anything in older posts or on the web – except one
   issue related to pop-up comments.
 * thank you.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/errors-when-leaving-comments/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/errors-when-leaving-comments/page/2/?output_format=md)

 *  [callamonster](https://wordpress.org/support/users/callamonster/)
 * (@callamonster)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147924)
 * i don’t know how to help but i’m having the same problem! did you find anything
   out? someone help us please 🙂
 *  [callamonster](https://wordpress.org/support/users/callamonster/)
 * (@callamonster)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147925)
 * i found the text, but i don’t know what this means-
 * <?php
    if (!$_SERVER[‘HTTP_REFERER’] == dirname(__FILE__) . ‘/wp-comments.php’){
   die (‘Error: This file cannot be used on its own.’); } /* Don’t remove these 
   lines. */ $blog = 1; require (‘wp-blog-header.php’); add_filter(‘comment_text’,‘
   popuplinks’); foreach ($posts as $post) { start_wp(); ?>
 *  [lunarpowered](https://wordpress.org/support/users/lunarpowered/)
 * (@lunarpowered)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147945)
 * I am having the same problem on WordPress 1.5.
 * “Error: This file cannot be used on its own.”
 *  [pericat](https://wordpress.org/support/users/pericat/)
 * (@pericat)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147946)
 * Just left a comment with the pink blog as a test. No error. Also with Jons Blog.
   No error there, either. 🙁 Sorry, guys.
 *  [lunarpowered](https://wordpress.org/support/users/lunarpowered/)
 * (@lunarpowered)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147947)
 * Yeah, we can’t recreate the errors because it’s only coming from SOME people.
   but thanks for the help.
 *  [tcpayne](https://wordpress.org/support/users/tcpayne/)
 * (@tcpayne)
 * [21 years ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147965)
 * I’m seeing this error as well on the fiancee’s blog at [http://www.believemagic.com/journal](http://www.believemagic.com/journal).
   I get the error in IE6 SP2 under Windows XP SP2 on two different PCs (one is 
   an actual PC, the other is a Virtual PC under MacOS X). The fiancee also gets
   the error from work under Win2k in IE5.5 (she thinks that’s the IE version, anyway).
   And one of her users mentioned it to her, which is how we found out in the first
   place (unknown OS and browser).
 * Safari 1.2.4, FireFox 1.0, and IE 5.2 on the Mac exhibit no problems. Similarly,
   FireFox 1.1 on the PC has no problems. But every time I try to click on any comment
   link in IE6 in XP, I get the “error: file cannot be used on its own” message.
   This includes posts that already have a comment or two posted, FWIW.
 * Is there a recent update to IE for the PC that would cause pop-up comments to
   go AFU? A security setting, perhaps?
 * I’ll have access to a few more machines at the university tomorrow – I’ll see
   if I get the error from there as well.
 * Troy
 *  [tabooprincess](https://wordpress.org/support/users/tabooprincess/)
 * (@tabooprincess)
 * [21 years ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147966)
 * I only get the error when I try to post comments to other friends WP blogs that
   are a newer version. I have an older version of WP and have no problems commenting
   and no one has ever told me that they get that error. I have tried numerous friends
   blogs in numerous browsers and get that blasted error message and it is driving
   me insane quite frankly.
 * Jessica
 *  [tcpayne](https://wordpress.org/support/users/tcpayne/)
 * (@tcpayne)
 * [21 years ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147968)
 * I have been able to narrow this down a bit. I should say from the start that 
   I know nothing of PHP and very little about HTML… but working from the code around
   the error message:
 * if (!$_SERVER[‘HTTP_REFERER’] == dirname(__FILE__) . ‘/wp-comments.php’)
 * I figured that the referer request header might be involved here.
 * In Opera you can easily enable/disable sending that header. With the referer 
   header enabled, I get no error message. With the header disabled, I get the error
   every time. Tested in Opera v8.0 on the Mac and v7.54 on Windows.
 * I’d love it if others could reproduce that result, just to make sure it’s nothing
   wacky on my end.
 * Using the steps outlined at [http://codex.wordpress.org/Enable_Sending_Referrers](http://codex.wordpress.org/Enable_Sending_Referrers)
   however, does not eliminate the error in IE6 for Windows. The Windows machines
   are running XP SP2 and there’s no security software – even the Windows firewall
   is disabled.
 * Any ideas from the gurus? I can’t figure out how to enable sending the referer
   in IE.
 * Troy
 *  [billyum](https://wordpress.org/support/users/billyum/)
 * (@billyum)
 * [21 years ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147972)
 * Any ideas anyone? One of my friends is getting the same error.
 * So far I’ve gotten that this is a problem with the referer header. Is it located
   in the popup comments file? If so… why is the error showing up for regular comments(
   no popup)?
 *  [tcpayne](https://wordpress.org/support/users/tcpayne/)
 * (@tcpayne)
 * [21 years ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147973)
 * I’m only seeing the issue when popup comments are enabled. With popup comments
   commented out, there’s no problem. That’s been the temporary fix for the fiancee’s
   blog (disable popup comments) since I can’t very well tell her users they must
   use Opera.
 * So what would happen if I just commented out these lines in wp-comments-popup.
   php:
 * if (!$_SERVER[‘HTTP_REFERER’] == dirname(__FILE__) . ‘/wp-comments.php’)
    { die(‘
   Error: This file cannot be used on its own.’); }
 * As I said before, I know precisely jack about PHP. What’s the purpose for these
   lines? Is using the referer header merely an anti-spam device, or does it serve
   a larger purpose? Is the error message really caused by the referer header being
   not present (or malformed somehow) or does it just look that way?
 * The same lines appear in wp-comments-post.php… would I have to remove them from
   there as well?
 * More to the point, will I be crushed by a huge foot (Monty Python animation-style)
   if I just sorta remove those lines and see what happens?
 * Troy
 *  [henson123](https://wordpress.org/support/users/henson123/)
 * (@henson123)
 * [21 years ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-147977)
 * Hey, there.
 * One of my important visitors had this same problem with the “Error: This file
   cannot be used on its own.” We spent days trying to get around it and nothing
   seemed to work.
 * Finally, we attempted to post after SHUTTING DOWN NORTON ANTI-VIRUS. It worked
   like a charm. Now, this is not, in any way, a permanent fix, but it does give
   us the next step to investigate. Is there something is anti-virus software that
   causes referer headers to be sent or not? I’d like to find out so I can ensure
   ease of use for my site. Every visitor is precious, you know. Feel free to stop
   by and take a looksie yourself.
 * [http://www.keithatkeith.com](http://www.keithatkeith.com)
 *  [stonegauge](https://wordpress.org/support/users/stonegauge/)
 * (@stonegauge)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-148028)
 * Has there been any movement on this? A definate cause / solution been found?
 * I’ve got a friend running WordPress 1.5 that I set up for him and he was just
   told by one of his site visitors that the error is coming up when this site visitor
   tried to comment.
 * The site is [http://www.sticksoffire.com](http://www.sticksoffire.com) . He’s
   using pop-up comments….
 *  [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * (@tomhanna)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-148029)
 * I think that particular bit of code is there to prevent spam bots from leaving
   comments, since they won’t show the necessary referrer information. So if the
   tradeoff is that some nonstandard browser configurations (my Firefox works fine)
   can’t leave comments, I wouldn’t mess with it.
 *  [shadyq80](https://wordpress.org/support/users/shadyq80/)
 * (@shadyq80)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-148048)
 * I found that this error only occurs when I disable referrer logging on Opera 
   8.01
 * I hope this helps.
 *  [brazir](https://wordpress.org/support/users/brazir/)
 * (@brazir)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/errors-when-leaving-comments/#post-148064)
 * It’s part of Norton’s privacy features to disable your browser to send certain
   information from your machine.
 * If the site U leave from or go to rely on this information and has bad coding(
   to avoid the error if not found) U get the actual error.
 * So, the problem lies within the code of the page that faults (partly), Norton
   default privacy settings or U have manually disabled your browser to send the
   information needed by the blog to complete its tasks.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/errors-when-leaving-comments/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/errors-when-leaving-comments/page/2/?output_format=md)

The topic ‘errors when leaving comments’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 28 replies
 * 22 participants
 * Last reply from: [lynx77](https://wordpress.org/support/users/lynx77/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/errors-when-leaving-comments/page/2/#post-148107)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
