Ban user error

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Kev_Dawg
Registered User
Posts: 33
Joined: Thu Oct 05, 2006 6:12 am

Ban user error

Post by Kev_Dawg »

Hey guys I just wanted to ban a user, but when I did that I got this error.

Code: Select all

Couldn't insert ban_userid info into database

DEBUG MODE

SQL Error : 1364 Field 'ban_ip' doesn't have a default value

INSERT INTO phpbb_banlist (ban_userid) VALUES (21)

Line : 195
File : admin_user_ban.php
I am not sure on what to do now, how can I fix this?

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Post by karlsemple »

run this sql query in phpmyadmin

Code: Select all

ALTER TABLE `phpbb_banlist` CHANGE `ban_userid` `ban_userid` MEDIUMINT( 8 ) DEFAULT '0',
CHANGE `ban_ip` `ban_ip` VARCHAR( 8 )

if your table prefix is not phpbb_ then you will need to edit that in the query :)
Image

Kev_Dawg
Registered User
Posts: 33
Joined: Thu Oct 05, 2006 6:12 am

Post by Kev_Dawg »

karlsemple wrote: run this sql query in phpmyadmin

Code: Select all

ALTER TABLE `phpbb_banlist` CHANGE `ban_userid` `ban_userid` MEDIUMINT( 8 ) DEFAULT '0',
CHANGE `ban_ip` `ban_ip` VARCHAR( 8 )

if your table prefix is not phpbb_ then you will need to edit that in the query :)


Thanks man for the help. I am new so how do I edit this stuff in PHPmyadmin, I have it opened right now.

User avatar
Lumpy Burgertushie
Registered User
Posts: 67048
Joined: Mon May 02, 2005 3:11 am
Contact:

Post by Lumpy Burgertushie »

make sure you have your phpbb database selected from the left side.

on the right side, click on the tab at the top that says SQL

then copy and paste the code he showed you into that box ( make sure you clear the box first if it has anything in it )
then click the go button, then on the next screen click yes.
'

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Kev_Dawg
Registered User
Posts: 33
Joined: Thu Oct 05, 2006 6:12 am

Post by Kev_Dawg »

Lumpy Burgertushie wrote: make sure you have your phpbb database selected from the left side.

on the right side, click on the tab at the top that says SQL

then copy and paste the code he showed you into that box ( make sure you clear the box first if it has anything in it )
then click the go button, then on the next screen click yes.
'

robert


Hm, it worked, why did this happen in the first place?

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Post by karlsemple »

Kev_Dawg wrote:
Lumpy Burgertushie wrote:make sure you have your phpbb database selected from the left side.

on the right side, click on the tab at the top that says SQL

then copy and paste the code he showed you into that box ( make sure you clear the box first if it has anything in it )
then click the go button, then on the next screen click yes.
'

robert


Hm, it worked, why did this happen in the first place?



did you by ant chance make a database backup via the admin control panel on an older database version and then restore it into a newer database version?
Image

Locked

Return to “2.0.x Support Forum”