Posts Tagged ‘PHPBB’

How to reduce spam in PHPBB based internet forum on Debian GNU / Linux

Monday, March 26th, 2012

phpbb reduce spam bot registrations on Debian Linux tiny script

I had to install two PHPBB based internet forums, some long time ago. Since long time passed and I haven't checked what's happening with them I just noticed. They start filling up spam threads. The phpbb installations are done using the standard shipped deb packages in Debian Linux Lenny.

After checking online, I found one smart solution to . The idea is very simple most spam bots are written in a way that they don't have a properly set timezone. Therefore the quickest way to get rid of spam bots which try to auto register and put spam content inside the a forum category or post is to add a simple if condition in php to check the browser set timezone:

The file to add the php if condition is ucp_register.phpThe phpbb package install places default phpbb path on Debian is /usr/share/phpbb3/ and hence the file I had to modify is located in:

/usr/share/phpbb3/www/includes/ucp/ucp_register.php

To make the TZ check one needs to modify ../www/includes/ucp/ucp_register.php and look for php array definition:

$data = array(
'username' => utf8_normalize_nfc(request_var('username', '', true)),
'new_password' => request_var('new_password', '', true),
'password_confirm' => request_var('password_confirm', '', true),
'email' => strtolower(request_var('email', '')),
'email_confirm' => strtolower(request_var('email_confirm', '')),
'confirm_code' => request_var('confirm_code', ''),
'lang' => basename(request_var('lang', $user->lang_name)),
'tz' => request_var('tz', (float) $timezone),
);

Right after this chunk of code add the if condition code which is like so:

if ($data['tz'] == '-12.00')
{
die('Die, bot! Die.');
}

From now onwards, any attempt for new user registration with an incorrect timezone of -12.00 will be immediately stopped while the forum spammer bot will be offered an empty page 🙂

Another good practice is to disable Birthday Listing from phpbb Admin Control panel (ACP). Go to menus:

ACP -> General -> Board Settings -> Enable Birthday listing: (No)

Enable birthday listing phpbb forum screenshot

I like disabling birthday listing, as when it is enabled and you have some spammer registrations, which even though didn't succeeded to contaminate your forum content has specified a birthday and therefore there profiles gets popping up each different day on the main page of the forum.
This will not eradicate all spammer bots, but at least will significantly decrease spammer bot registrations.

How to fix “The extension ppt is not allowed.” with phpbb on Linux

Monday, September 13th, 2010

I’ve recently installed a PHPBB forum, but until today I haven’t really tested the newly installed forum on how it behaves.
Today I’ve played around with it a bit at a first glance the admin interface or (Admin Control Panel) looked quite confusing.

However after I’ve taken the time to played with it things started getting clearer and clearer.

First thing I did is to add a new forum. From the link Administration Control Panel which by the way strangely is placed at the bottom of the forum entry page after logging in with the admin user. Therein I have to select the Forums menu and use the Create new forum button located in the down left corner on the page.

Of course it’s necessary to fill in the required forum before you proceed to the Create new forum button.

Anyways after I did created the new forum I tried I posted a new topic just as a test where I tried to attach a microsoft presentation .ppt as well as an open office presentation .odp file.

However the new topics refused to get posted on the forum and a message appeared saying:

The extension ppt is not allowed.

That message did showed up when I tried uploading the .ppt file, whenever I tried with the .odp file a similar message poped up in the browser:

The extension odp is not allowed.

It took me a while until I can find the solution and in order to allow back the .odp and .ppt files I had to use the PHPBB Admin Control Panel

Then follow the links:

ACP -> Posting -> Manage extensions groups

When the whole list of EXTENSION GROUPS,SPECIAL CATEGORIES and OPTIONS gets listed I had to press the wheel (Edit Menu) in EXTENSION GROUP for Documents and from there to tick the Allowed and Allowed in private messaging menu.

Last I pressed the Submit button on the bottom of the page and hooray the upload extensions started working!