Recent Topics

1 May 25, 2008 12:33    

My b2evolution Version: 2.4.2

What I get back while trying to comment is:

"Forbidden
You don't have permission to access /htsrv/comment_post.php on this server."

Well at first I used of course the forum search, but in the end those two threads found haven't helped. Secondly, I tried to solve this via changing the comment_post.php permissions to 766, but no change; is there a specific user/group needed? Then I checked my .htaccess, and tried several entries without success.

Here are the uncommented entries of .htaccess:


<IfModule mod_php4.c>
	php_flag register_globals off
</IfModule>
<IfModule mod_php5.c>
	php_flag register_globals off
</IfModule>
<IfModule mod_dir.c>
	DirectoryIndex index.php index.html
</IfModule>

RewriteEngine On

RewriteCond %{HTTP_REFERER} !^https://blog.mbyte.eu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.blog.mbyte.eu/.*$ [NC] 
RewriteCond %{REQUEST_URI} ^.*comment_post\.php$
RewriteRule .* - [F] 

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^  index.php

Thanks for any suggestions, rent

2 May 25, 2008 13:20

and if you remove this:


RewriteCond %{HTTP_REFERER} !^https://blog.mbyte.eu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.blog.mbyte.eu/.*$ [NC]
RewriteCond %{REQUEST_URI} ^.*comment_post\.php$
RewriteRule .* - [F] 

3 May 25, 2008 13:42

Okay, i commented out the following:


<Directory /var/www/>
[...]
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</Directory>

and ...


RewriteCond %{HTTP_REFERER} !^https://blog.mbyte.eu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.blog.mbyte.eu/.*$ [NC]
RewriteCond %{REQUEST_URI} ^.*comment_post\.php$
RewriteRule .* - [F]

But still the same error occurs.

4 May 25, 2008 13:51

What was the file permission for that folder before you did anything to address this problem? I'm not sure ... in fact I have no idea really, but I'm pretty sure that in the past this type of issue was resolved by noticing that the server didn't like what was happening in there when the permissions were set too open. Try 755 and see if that works?

Also do search the forums as I'm quite certain this issue has happened and been resolved before. Sorry but I've no link handy to a relevant thread.

5 May 25, 2008 14:19

Okay a change back to 755 worked (I also changed the group to "users"), thanks for that.
Now there's a new issue. When i send a comment, b2evo gives me the following (original in german): a parameter «comment_post_ID» is necessary! I'm going to research that one.

6 May 25, 2008 15:20

I haven't found anything useful (but http://forums.b2evolution.net/viewtopic.php?t=15152). The exact error states this:

"Bad Request!
The parameters of your request are invalid.

Additional information about this error:
Parameter «comment_post_ID» is required!"

Any ideas or hints? Should i open a new topic?

Thanks in advance!

7 May 25, 2008 15:51

http://forums.b2evolution.net/viewtopic.php?t=15152

We do have parallel conversations occurring.

The problems appears to be in the relative pathing and, in particular, how it is handled on IIS servers versus UNIX.

I've really not investigated the problem, but I did make a little hack to at least stop the errors in the short term.

In the other post, you'll see the reference to replacing the link in comment_post.php from the variable to hard coding the location. In my case, I just sent it to the index page of the blog, returning to the user to the most recent post.

This is fine for submitting the post, but the error still occurs in Preview mode. So, in blogs/skins/ _item_comment_form.inc.php, I simply disabled the preview button by commenting out line 172.

I'm not proud of this solution, but like I said, I only spent a few minutes on it and this was the simplest approach (the "if the preview button befouls you, cut it out" approach).

I suspect identifying and resolving the "relative path" problem isn't going to be very hard; I (or somebody) just need to dig into it.


Form is loading...