if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
header('Allow: POST');
header('HTTP/1.1 405 Method Not Allowed');
header('Content-Type: text/plain');
echo "foo";
exit;
}
I added the line "echo "foo"; to find out where the code was breaking.
When I try to post a comment, it won't get past this IF statement.
I have no idea why not...
Thoughts?
I just echo'ed out ... $_SERVER['REQUEST_METHOD'];
and my method is a GET.
Why is it trying to POST with a GET command? Now I'm really confused.
So, my "comments.php" page does this
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" class="comment_form" id="commentform">
and passes the correct URL as the action.
The method is POST
but when it tries to load the page it thinks its "GET"
The result is a blank white screen.
Thoughts?
Try another theme, see if you get the same issue.
I do.
Even with the default theme.
For what its worth, I have an older instance of WPMU running on a development box that is NOT suffering this problem... and I've looked at the comments.php and the wp-comments-post.php file and they appear identical for the relevent parts.
What could be changing this request from a POST to a GET?
Thanks.
I have plugins installed, but for this new blog, none of them are activated.
I've got lightbox2, re-CAPTCHA, and the about me widget.
Does it help that this is running behind SSL? anyone?
I tried it behind SSL, and it worked for me with the default theme - newest tagged version of WPMU. Which version are you using?
When was 2.6.3 released? (wpmu doesn't seem to tell you anywhere what version you're on)
I'm pretty sure I'm on the latest release.
I just installed a brand new fresh install of wpmu 2.6.3 (downloaded today) in to a new sub directory on my server.
I did nothing but set it up, and then I created a new blog.
I tried to add a comment, and it failed the same as above.
the *ONLY* thing I can think is different then a "normal" set up is that this is behind SSL, and when I submit the comment it warns me that a non secure item is being sent.
Thoughts?
get_option('siteurl')... returns the non SSL URL of my site.
could this be the problem?
as in... "http://...."
not "https://..."
How do I get 'get_option('siteurl') to respect the HTTPS nature of my site?
found the solution from this thread.
http://mu.wordpress.org/forums/topic.php?id=3225#post-24064
......
I had a similar problem using lyceum (which is based on Wordpress) so I did the following. I added the following filters to wp-includes/default-filters:
add_filter('option_siteurl', 'convert_https');
add_filter('option_home', 'convert_https');
and the following function to wp-includes/functions-formatting.php:
function convert_https($text) {
return str_replace("http://", "https://", $text);
}
rcwatson
Member
Posted 15 years ago #
I'm not using https for my intranet site, but noticed this behavior after upgrading from 2.6.2 to 2.6.3. I don't want to apply the solution above because a) it hacks the core, which I dislike doing, and b) I don't use https.
Any other thing this could be?