TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 651
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 466
  • Total: 466

TP Shoutbox suddenly throws 406! [solved]

Started by gah, July 30, 2009, 11:19:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gah

I have used the built-in shoutbox in TP for over a year now with no problems, but all of a sudden it starts throwing 406 errors when people try to shout. Nothing has changed in SMF configuration or TP configuration, and no additional modules have been installed over that year except official SMF updates.

I am using TP 0.9.8 on SMF 1.1.9. Some users reported that they were able to shout a little while longer than others - one girl was able to shout a few times more from her workplace after it stopped working at home. However, when my users select to view the "last 30" shouts, so they get the shoutbox in full screen, then they are able to shout normally.

I have emptyed browser cache, cookies and so on to no avail. I have tested with IE7, FF, Opera 10 beta and Epiphany and the bug happens independently of browsers. I deleted all the posts in the shoutbox, and eventually the shoutbox itself, re-enabled it, but no go. My provider uses Apache on Linux.

ZarPrime

That is an unusual error and usually indicates that something the server is trying to send to your site is not acceptable.  Are there any other errors in your Forum error log or in your apache error log that would shed some light on this?  The first thing I would do is check all the shouts and see if someone put something in there that looks strange.  If so, remove it.  Also, ask your host if they have added anything to the server that would cause this error.  The following topic may also help ...
http://urbangiraffe.com/2005/08/20/mysterious-406-error/

Let us know what you find out.

ZarPrime

gah

#2
OK. Let's see. I have already considered the mod_security problem, and I added some lines to my %/public_html/.htaccess file. This did not seem to have an effect.

The issue produces no messages in the forum error log.

As mentioned above, I have deleted all shouts. There are no shouts with strange characters there now. Also, the error appears only when posting shouts, not when viewing them or performing administrative functions on them.

The error appears absolutely instantly when you press the "shout" button - seemingly, no processing activity takes place before the error appears. As mentioned, shouting works fine as long as you shout from the full shoutbox view.

I do not believe I have access to the Apache logs. I have, however, mailed the provider but have gotten no response as yet.

Zetan

I've moved this to support for now, until we establish whether it's a TP error, or an error server side.

Freddy

Can you provide me with a link to your site gah please.  I might have an idea on this one, I just need to see how things are set up in the old TP because I don't have that version any more.

Freddy

#5
I had similar problems with SMF Gallery a while back, it was to do with the way links are formed - it seems to be a problem with some hosts where they might have upgraded something (PHP or APache I am not sure which at this time) or increased security on what types of URL they like to process.

Anyways...

Here's something you could try.

In ....Themes/default/TPortalBlocks.template.php

Find (line 612) :

<form  accept-charset="', $context['character_set'], '" class="smalltext" style="padding: 0; margin: 0; margin-top: 8px; text-align: center;" name="tp-shoutbox" action="'.$scripturl.'?action=tpmod;id=shout" method="post">';

Change to :

<form  accept-charset="', $context['character_set'], '" class="smalltext" style="padding: 0; margin: 0; margin-top: 8px; text-align: center;" name="tp-shoutbox" action="'.$scripturl.'?action=tpmod&amp;id=shout" method="post">';

All I changed  there was this bit action=tpmod;id=shout into action=tpmod&amp;id=shout

No promises, but worth a try.

Got to go massive thunder storm here - lightning the works - need to turn PC off before I am toasted.

gah

This site is at forum.skyggeland.com. However, it's a private forum, and access is restricted to registered users, so you won't be able to see the shoutbox...

Has been some hefty thunderstorms her too in the last few days. First thing I always do is to pull the telephone plug from the ADSL router - the only time I have been hit by lightning it came in through the telephone plug and toasted the ISDN box, router, server network card and PSU.

I can see what you're thinking, freddy888. Replacing the ; with the &. Definately worth a shot, i'll post back in a moment.

gah

#7
It worked! Hallelujah. Now I'm certain that it's the provider that is to blame - they must have installed something that filters out URIs with ; in them, as you said. Probably not a good idea, since W3C recommends the use of semicolons in place of ampersands in CGI ( http://www.w3.org/TR/html4/appendix/notes.html#ampersands-in-uris ).

But hey, it works, and you're my hero, freddy888!  :)

Freddy

#8
 :D Nice to hear it works.  Yeah my thunder storm was a big one, so I just played safe.  Having also been in a house that got struck by lightning I am just that little bit wiser too.

I agree with your assessment of URI's, what I find strange is how sometimes using ; will work but other times it refuses it.  There's probably more going on there than would seem obvious.

Would have been nice if mine and your hosts warned us about the changes they made.  Ho hum...

Cheers  :)

This website is proudly hosted on Crocweb Cloud Website Hosting.