Jump to content

Recommended Posts

Posted (edited)

Hi - I'm having problems with comments at my site at http://www.eatitandloveit.com

 

Whenever I click on a link to a user's website from their comment, I get a 403 Forbidden error that says:

 

"You don't have permission to access /cgi-bin/mt/mt-comments.cgi on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. "

 

I think it may have something to do with the fact that I recently moved my blog to a new account and domain, but after that, I'm not sure what exactly could be wrong.

 

Any ideas what could be set up wrong? Thank you!

Edited by julie
Posted

Hmm... I'm not a MT user, but I found this code interesting:

 

when you view the source of the links in your comments, this is what you get:

 

><a target="_blank" title="http://www.aftertastebliss.com" href="http://www.eatitandloveit.com/cgi-bin/mt/mt-comments.cgi?__mode=red;id=81">Julie</a>

 

So, in the status bar it shows the site the user entered, aftertastebliss.com. But when you click the link, it is actually trying to run some script in your CGI bin.

 

I don't know why this is. Again, I've never used MT. But I thought this might help somebody else diagnose the problem.

 

Good luck...

Posted

Well, that was just one of the comments. I didn't look at all of them. I just assumed that that address was the one entered by the commentor...

Posted
Well, that was just one of the comments. I didn't look at all of them. I just assumed that that address was the one entered by the commentor...

 

ahh, youre right. i still do use that domain and that comment was by me. heh. hence the confusion.

Posted (edited)

It doesn't sound as though your permissions are correctly set.

 

Also, the address that appears for your old site appears because you entered it when you were commenting.

 

Woops, bit too slow to respond.

Edited by marie b.
Posted

yeah, I just verified that those names change by the poster. It also appears that when the link is a mailto link (if a user enters their email address) that the link works correctly (it opened my default email program with a message addressed to the person who left the comment).

Posted

Hmm . . that's curious.

 

I was having the same problem on an MT install on another site, and did something (I can't remember what exactly, but I know I changed them) to the permissions and it worked perfectly.

 

Then again, I'm only a novice.

Posted

I've looked at the site - the HTML code for link appears to be correct. As near as I can tell, something on the server is objecting to something specific in those comment links.

 

As you know, this URL currently displays a '403 Forbidden' error page:

>http://www.eatitandloveit.com/cgi-bin/mt/mt-comments.cgi?__mode=red;id=81

However, if the ';' in the link between the '__mode=red' and 'id=81' is changed to an '&':

>http://www.eatitandloveit.com/cgi-bin/mt/mt-comments.cgi?__mode=red&id=81

...the link works properly and the user is redirected to the correct page.

 

I've tested comments links with the ';' in my own MT installations and they work properly, so it doesn't appear to me to be a problem with the link itself.

 

Do you have anything in your .htaccess files that restrict access to files in any way? When a user browses to one of the comment links like the above, the server will read the .htaccess files in your /public_html, /public_html/cgi-bin, and /public_html/cgi-bin/mt directories in figuring out what should and shouldn't be allowed, so you'd need to look at all of them.

 

Another possibility is that something has been added to the mod_security configuration for your server, and your commenter links are getting inadvertantly blocked by it. If this is the case, you'd need to submit a ticket to the Help Desk and ask them to investigate it.

Posted

I almost forgot - you can work around this issue if you'd rather not spend time on trying to figure it out and resolve it.

 

In mt/lib/MT/Template/Context.pm (3.121 version), scroll down to line 1565, where you should see the following code (line 1565 is the second line below):

>       if ($c->id && !$args->{no_redirect}) {
           return sprintf(qq(<a target="_blank" title="%s" href="%s%s?__mode=red;id=%d">%s</a>),
                          $url, $cgi_path, $comment_script, $c->id, $name);

Change the ';' to '&':

>           return sprintf(qq(<a target="_blank" title="%s" href="%s%s?__mode=red&id=%d">%s</a>),

Save the file, re-upload Context.pm to the server (in ASCII mode), then rebuild at least your Individual Entry Archives so the commenter links will be updated.

Posted

Thank you for all your help - I tried your last recommendation (changing the ; to an &) and now it works. THANKS AGAIN!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...