WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 403 Permission Denied on all comments (23 posts)

  1. PeterParkorr
    Member
    Posted 1 year ago #

    Hi,

    I'm having problems with comments on my site. Anyone trying to comment gets the message;

    403 Permission Denied
    You do not have permission for this request /wp-comments-post.php

    even if it's me and I am logged in as an admin. The site is not the primary site on the network, and other network sites allow commenting as normal.

    I don't think it is a plugin problem as I've disabled them all and no change. However it is the only domain mapped site on the network.

    Looking at my .htaccess file, its permissions were set to 0404. Is that normal? I tried setting them to 644 as per the codex article but again no change.

    No comments have been possible on the site for 3 weeks now, any help appreciated!!

    Peter

  2. What are the permissions on wp-comments-post.php?

  3. PeterParkorr
    Member
    Posted 1 year ago #

    Hi Mika,

    That is a very good point. It is set to 0644.

    All folders are set to 0755 and all files are set to 0644, with the exception of .htaccess which was set to 0404 and is now 0644.

    Could it be a problem with a mod_sec rule on the host, that I've seen referred to elsewhere? I've asked them but no response yet.

    The .htaccess file is heaving with lines added by the Bullet Proof Security plugin, but that has been on there since the start and comments weren't affected.

  4. Maybe. I've had stupid things happen with the new mod_security (they have new default rules which don't upgrade cleanly) but usually they error out with a 500. Is anything in your server log for comments?

  5. PeterParkorr
    Member
    Posted 1 year ago #

    Thanks for your help so far Mika.

    There are two error logs that I can see.

    One in public_html with ~400 lines, the last month being 2-5 lines per day all saying;
    PHP Fatal error: Class 'GA_Admin' not found in /home..[]..wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 1583
    These stop on the 29th Nov.

    The error log file in wp-admin has 828 lines, but from November onwards they are also only the same GA PHP error, about twice a week, stopping on 27 Nov.

    Nothing in either file relating to comments. My host came back to my mod_sec query with BS that they couldn't help with third-party code or debugging websites so still waiting a coherent response after throwing a wobbly in reply.

    Is there any chance this is a dodgy dashboard setting? I've checked a few times but seems not, and I can't find many similar problems online.

  6. Well the normal debug route is to turn off all the plugins and see if it works. Have you started that?

  7. PeterParkorr
    Member
    Posted 1 year ago #

    Absolutely. I've turned off all plugins on the site and the network, and still not been able to comment, as well as trying Jetpack comments and CommentLuv to see if that made a difference.

    This is the only site (of 3) on the network that is having the problem, so I also changed the theme to see if that was causing a conflict.

    None of that made any difference tho. :/

  8. Wait, only one site?

    Step back. What's special about that site?

    What happened right before this started happening?

  9. PeterParkorr
    Member
    Posted 1 year ago #

    Well, it's the only Domain Mapped site, the others are not really up to much, just a test site and a semi-started project.

    Could it actually be Google Analytics? Also the only site with that plugged in. I setup GA about the 28/29 October and the last comment was a couple of days before that (site doesn't get many so far).

    I can't think of anything else major that I did around then other than playing with plugins. I noticed comments were broken when someone gave me a heads up a couple weeks ago...

  10. PeterParkorr
    Member
    Posted 1 year ago #

    Actually I had a theme problem with pagination and permalinks about that time, so I had to create a new 'home' page to resolve that. Not sure that could be related.

  11. PeterParkorr
    Member
    Posted 1 year ago #

    My host came back to say mod_sec isn't enabled on the server and there haven't been any recent changes.

  12. PeterParkorr
    Member
    Posted 1 year ago #

    Bump for any pointers, I've never debugged a site before. Is the only way to fix this going to be learning how to debug from the codex? The timing is impeccable.

  13. Don't bump (I was reeeeeeally busy).

    Well, it's the only Domain Mapped site, the others are not really up to much, just a test site and a semi-started project.

    Turn off domain mapping for that site. Does it work?

  14. PeterParkorr
    Member
    Posted 1 year ago #

    Aaargh. When I turn of domain mapping the comments do work :(

    Dislike. What do you recommend? Fixable? Really not what I need now. Why isn't anyone else having this problem - my theme?

    I updated to 3.5 without any problems. (Sorry for the bump btw, wasn't aware it is bad form and thought someone else may spot it and chip in.)

  15. Well we're just narrowing things down now ;)

    Okay so that's actually good! Turn on mapping again.

    What mapping options did you check?

  16. PeterParkorr
    Member
    Posted 1 year ago #

    Woo! lol. I assume you aren't also in GMT timezone and up all night like me? :) Happy to provide coffee either way.

    My domain mapping has the server IP, no CNAME and only option 2 checked of the five available;

    1.Remote Login
    2.Permanent redirect (better for your blogger's pagerank)
    3.User domain mapping page
    4.Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)
    5.Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.

    This was the safest/best setup for me when I read the codex, as I didn't want site problems and don't have other users logging in. I log into 'the problem site' at problemsite.com/wp-admin/ and everything works. Clicking on Network Admin options (update page, Network dashboard etc) redirects me to the primary domain to login again (as the same user).

  17. I'm in Pacific US ;)

    Clicking on Network Admin options (update page, Network dashboard etc) redirects me to the primary domain to login again (as the same user).

    That's ... actually not a bug. Assuming you can login from there, it's how it's supposed to work due to cookies and blah blah security.

  18. PeterParkorr
    Member
    Posted 1 year ago #

    Yep, i knew that wasn't a bug, just thought it might be related to the origin of the bug... :)

    Those are the only settings i have anyway, what next to find out why it brings up a 403 on comments?

    Thanks again for the help.

  19. PeterParkorr
    Member
    Posted 1 year ago #

    I've just spotted on the domain mapping plugin installation page, that putting domain_mapping.php into the wp-content/mu-plugins folder is not required;
    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/installation/

    (it is mentioned when following Otto's linked instructions;
    http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/)

    Should I try uninstalling and putting it in the regular plugins folder?

  20. You may as well. I have it in regular plugins as network activated.

  21. PeterParkorr
    Member
    Posted 1 year ago #

    The plugin is now installed normally and still causing 403 errors on the site when I try to comment. I think it is a conflict with my theme, as all other theme/site/mapping combinations work, just not this theme with mapping turned on. Where do I go from here??

  22. PeterParkorr
    Member
    Posted 1 year ago #

    Hi Mika,

    I'm seeing new problems in the backend now (can't edit post URLs, Yoast SEO plugin almost disappeared) which are probably because I updated to 3.5. Probably.

    I'm also getting a 500 server error when I try to delete the NextGEN Gallery plugin specifically. Firstly tho, my .htaccess has gone back to 0404 permissions without me changing it. Does this mean the host could be causing problems?

  23. PeterParkorr
    Member
    Posted 1 year ago #

    Finally, a result! I started a thread under the BulletProof Security plugin to check it wasn't the .htaccess file causing grief.
    http://wordpress.org/support/topic/htaccess-permissions-changing-and-403-error?replies=14
    It was! Removing some code designed to block spambots was the problem.

    Many Thanks for all your help Mika, marking this thread resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic