Log IP Address on Registration

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
112
78%
Very Good
16
11%
Good
8
6%
Fair
3
2%
Poor
4
3%
 
Total votes: 143

T12VNG
Registered User
Posts: 15
Joined: Fri Jul 04, 2008 10:12 am

Re: Log IP Address on Registration

Post by T12VNG » Fri Jul 04, 2008 10:57 am

by RMcGirr83 on Fri Jul 04, 2008 11:47 am
You didn't do the sql update on the database.
Rich McGirr
Ok, thanks.

How do I do that then? I'm pretty new to all this..... :oops:

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Log IP Address on Registration

Post by RMcGirr83 » Fri Jul 04, 2008 11:27 am

In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Rikonen
Registered User
Posts: 27
Joined: Sat May 17, 2008 1:25 pm

Re: Log IP Address on Registration

Post by Rikonen » Fri Jul 04, 2008 11:59 am

Does it run on phpBB 2.0.23???

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: Log IP Address on Registration

Post by TerraFrost » Fri Jul 04, 2008 5:25 pm

Rikonen wrote:Does it run on phpBB 2.0.23???
Yes.

T12VNG
Registered User
Posts: 15
Joined: Fri Jul 04, 2008 10:12 am

Re: Log IP Address on Registration

Post by T12VNG » Mon Jul 07, 2008 7:41 am

by RMcGirr83 on Fri Jul 04, 2008 12:27 pm
Knowledge Base - How to Install MODs

Read number 11 :)
Rich McGirr
I'll have a read through & see if I can sort it out, thank you again :) .

sceltic
Registered User
Posts: 64
Joined: Fri Nov 04, 2005 1:24 pm
Location: Ontario

Re: Log IP Address on Registration

Post by sceltic » Thu Jul 17, 2008 3:44 pm

Good mod.
Is it possible to log IP'S of failed login attempts. This would be useful against those trying to guess passwords of active members.

something simple like a emal to admin with the user name attempted and ip used

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51692
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Log IP Address on Registration

Post by Brf » Thu Jul 17, 2008 3:46 pm

That would be a totally different mod.
This one involves registration, not login.

sceltic
Registered User
Posts: 64
Joined: Fri Nov 04, 2005 1:24 pm
Location: Ontario

Re: Log IP Address on Registration

Post by sceltic » Thu Jul 17, 2008 5:10 pm

Sure, thinking more, I understand now that they are going to be different.
Ok does, Anyone know if there is there such a mod that logs the ip of failed logins?

User avatar
Jim_UK
Former Team Member
Posts: 18474
Joined: Tue Oct 12, 2004 5:36 pm
Location: Darwen N.West UK

Re: Log IP Address on Registration

Post by Jim_UK » Thu Jul 17, 2008 5:34 pm

This is a support topic for a mod and not to be used for mod requests.
The phpBB2 mod requests forum is closed to posting but you could search the database and maybe try over at phpbbhacks.

Jim
The truth is out there.
Unfortunately they will not let you anywhere near it!

microtekblue
Registered User
Posts: 90
Joined: Sat Nov 17, 2007 6:10 am
Location: Ontario, Canada

Re: Log IP Address on Registration

Post by microtekblue » Fri Jul 18, 2008 8:04 pm

Hello,

I understand the php part of this mod, but not too good with the sql.

Is there a step by step guide on how to do the sql changes?

Thanks :)

User avatar
Jim_UK
Former Team Member
Posts: 18474
Joined: Tue Oct 12, 2004 5:36 pm
Location: Darwen N.West UK

Re: Log IP Address on Registration

Post by Jim_UK » Fri Jul 18, 2008 8:24 pm

microtekblue wrote:Hello,

I understand the php part of this mod, but not too good with the sql.

Is there a step by step guide on how to do the sql changes?

Thanks :)
There is only one change and very easy to do.
Access your database with phpmyadmin and click the database name in the left hand column. Now click the SQL tab at the top right window.
Now copy and paste this

Code: Select all

ALTER TABLE phpbb_users ADD user_regip CHAR(8) NOT NULL DEFAULT '0';
into the small window and click "Go"

If you do not have access to a database tool such as that then you can generate a PHP file to run with your browser such as this

Code: Select all

<?php
/***************************************************************************
 *                               db_update.php
 *                            -------------------
 *
 *   copyright            : ©2003 Freakin' Booty ;-P & Antony Bailey
 *   project              : http://sourceforge.net/projects/dbgenerator
 *   Website              : http://freakingbooty.no-ip.com/ & http://www.rapiddr3am.net
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//


if( !$userdata['session_logged_in'] )
{
	$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
	header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
	exit;
}

if( $userdata['user_level'] != ADMIN )
{
	message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}


$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';


$sql = array();
$sql[] = "ALTER TABLE " . $table_prefix . "users ADD user_regip CHAR(8) NOT NULL DEFAULT '0'";

for( $i = 0; $i < count($sql); $i++ )
{
	if( !$result = $db->sql_query ($sql[$i]) )
	{
		$error = $db->sql_error();

		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
	}
	else
	{
		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successful</b></font></li><br />';
	}
}


echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&nbsp;</td></tr>';

echo '<tr><th>Installation Complete</th></tr><tr><td><span class="genmed">Please be sure to delete this file now.<br />If you require any further assistance, please visit the <a href="http://www.phpbbhacks.com/forums">phpBBHacks.com Support Forums</a>.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Go back to your index page</a>.</span></td></table>';

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Copy that into Notepad and save as db_update.php
Place it into a directory called "install" and ftp to the root of your board.
Log in and then run the file with your browser.
Now delete the install directory

Jim
The truth is out there.
Unfortunately they will not let you anywhere near it!

microtekblue
Registered User
Posts: 90
Joined: Sat Nov 17, 2007 6:10 am
Location: Ontario, Canada

Re: Log IP Address on Registration

Post by microtekblue » Fri Jul 18, 2008 8:38 pm

wow great Thank you Very much!! :D

Post Reply

Return to “[2.0.x] MOD Database Releases”