Geek help!

Can anyone tell me why having a new thread with the word ‘southbank’ in it crashes the thread?

Is that fucking weird or what?


Apache is borking not the BBS.

I am getting a 406 Not Acceptable.

From RFC2616 (Hypertext Transfer Protocol – HTTP/1.1)

10.4.7 406 Not Acceptable

The resource identified by the request is only capable of generating
response entities which have content characteristics not acceptable
according to the accept headers sent in the request.

Unless it was a HEAD request, the response SHOULD include an entity
containing a list of available entity characteristics and location(s)
from which the user or user agent can choose the one most
appropriate. The entity format is specified by the media type given
in the Content-Type header field. Depending upon the format and the
capabilities of the user agent, selection of the most appropriate
choice MAY be performed automatically. However, this specification
does not define any standard for such automatic selection.

  Note: HTTP/1.1 servers are allowed to return responses which are
  not acceptable according to the accept headers sent in the
  request. In some cases, this may even be preferable to sending a
  406 response. User agents are encouraged to inspect the headers of
  an incoming response to determine if it is acceptable.

If the response could be unacceptable, a user agent SHOULD
temporarily stop receipt of more data and query the user for a
decision on further actions.

GET /forums/nice-classic-fixwheel-seen-near-southbank-yesterday-vt1226.html?highlight= HTTP/1.1


User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060523 Ubuntu/dapper Firefox/

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: __utmz=97195272.1159144027.162.4.utmccn=(organic)|utmcsr=google|utmctr=shifterbikes|utmcmd=organic; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%22d6fb0585f753632cdcba1fcfe2fcf75b%22%3Bs%3A6%3A%22userid%22%3Bi%3A51%3B%7D; __utma=97195272.1447717035.1156116971.1161249212.1161252427.274; cpg133_data=YTozOntzOjI6IklEIjtzOjMyOiIzNzc3ZDRlM2RkNmZhOGUwYTZiYTlkOWYyMzkxMTNkZCI7czoyOiJhbSI7aToxO3M6MzoibGl2IjthOjU6e2k6MDtzOjM6IjE4NiI7aToxO3M6MzoiMTgzIjtpOjI7czozOiIxNzYiO2k6MztzOjM6IjE4OSI7aTo0O3M6MjoiNjkiO319; phpbb2mysql_sid=7335cedd97632b9edaa11d1fc1653ce9; __utmc=97195272; phpbb2mysql_t=a%3A7%3A%7Bi%3A1243%3Bi%3A1161252496%3Bi%3A1194%3Bi%3A1161246418%3Bi%3A1238%3Bi%3A1161249246%3Bi%3A1241%3Bi%3A1161252432%3Bi%3A1242%3Bi%3A1161252478%3Bi%3A1209%3Bi%3A1161254223%3Bi%3A1248%3Bi%3A1161254474%3B%7D; __utmb=97195272

Cache-Control: max-age=0

HTTP/1.x 406 Not Acceptable

Date: Thu, 19 Oct 2006 10:41:40 GMT

Server: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_jk/1.2.14 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.4 FrontPage/ mod_ssl/2.8.28 OpenSSL/0.9.7a

(anti-spam-(anti-spam-content-type:)) text/html; charset=iso-8859-1

X-Cache: MISS from

Via: 1.0 (squid/2.5.STABLE3)

Connection: close

Very hard to work out from this end with looking that Apache logs. Cut and paste them here, and I should be able to tell you more.

grr, ok - the apache error log isn’t being written, let me sort it out.

i know it’s apache not the board - but it has something to do with the mod rewrite rules, because it only happens when the subject of a thread contains the word ‘southbank’ - (the flattened thread name is based on the subject line) …

the .htaccess file reads:

Options +FollowSymlinks
RewriteEngine On
RewriteRule [.]-vf([0-9]) viewforum.php?%{QUERY_STRING}&f=$1
RewriteRule [.]-vp([0-9]) viewtopic.php?%{QUERY_STRING}&p=$1
RewriteRule [.]-vt([0-9]) viewtopic.php?%{QUERY_STRING}&t=$1

I was curious about that, thought it was just me who couldn’t see it. I also wondered how someone was able to reply to it.

yes, me too - i dont know how someone managed to view it… unless they went to the trouble of figuring out the postID and viewing it manually. seems excessive though :wink:


It looks like it is bank not southbank, which is causing the problem.

The regex [.]-vt([0-9]) is cool.

Matches everything upto vt followed by one more numerals, which is collected and passed into the MVC (Model view controller).

Very odd.

where do you work tristan?


hardcoded max path length at 32?

that’s what i initially thought NDF - however, even just using soutbank or bank in the subject crashes it…

here is the URL flattening php code:

	'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')


function make_url_friendly($url)

    $url = strtolower($url);

    $find = array(' ',

    $url = str_replace ($find, '-', $url);

    $find = array(' ',
    $url = str_replace ($find, 'e', $url);
    $find = array(' ',
    $url = str_replace ($find, 'o', $url);
    $find = array(' ',
    $url = str_replace ($find, 'a', $url);
    $find = array(' ',
    $url = str_replace ($find, 'i', $url);
    $find = array(' ',
    $url = str_replace ($find, 'u', $url);
    $find = array('/[^a-z0-9\-<>]/',

    $repl = array('',

    $url =  preg_replace ($find, $repl, $url);

    return $url;


function rewrite_urls($content)

    function if_query($amp)

        if($amp != '')
            return '?';


    $url_in = array('/(?<!\/)viewforum.php\?f=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',

    $url_out = array("make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
            "make_url_friendly('\\6') . '-vp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
            "make_url_friendly('\\6') . '-vt\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'");

    $content = preg_replace($url_in, $url_out, $content);

    return $content;


In front of two 19" LCDs. :smiley:

… snr web developer

are there perhaps higher level rewrite rules getting in the way?

bank anywhere in the path returns 406 eg:


tristan - ahhh, a web developer. i see :slight_smile:

ndf, maybe: here is the root .htaccess

BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php

END WordPress

looks like it has to be ‘bank’ too - ank ban ba nk etc all do the 404

grep all your http conf shit for ‘bank’

or make a forum rule that there can be no use of the word ‘bank’ in any format used in the subject line :slight_smile:

hahah - a patch! Nah just search the server’s default and host config thingo.

:roll: Hello Bill Gates


All this isssssss sooooooooooooooooooo over my head.

Have you fixed what ever the problem was?? :lol:

Fuck me… :smiley:

Tristan and Ndf you guys are all mad-scientist’s…

I am a simple man, I dig dirt.

havent figured it out. i suspect someone who has root on the box has some kind of anti phishing tool installed that is triggered by url’s requesting the word ‘bank’ …