I accidentally the whole board.. then fixed it.

Technical discussion relating to drugcrew.com & the forums
Bookmark and Share

I accidentally the whole board.. then fixed it.

Postby [DRuG]NikT on Wed Jan 25, 2023 6:21 pm

Not often I make an update these days - site is mainly still up for historical purposes but I was on last night removing someone's details at their request and decided to ban a spammer.

Not sure what happened, maybe they had a weird IP saved or something, but once I hit ban, nobody *even admin* could log in - just this message

image.png
oof

In case I have to fix it again, the tradition is I post the solution here, in case it helps someone else or at very least future me.

1. removed all recent IP bans directly from banlist in database
2. tested - still same error
3. remembered phpbb caches everything in it's database, so changes don't always appear immediately.
4. bust brain on how I can purge cache while locked out of the board - button is in admin panel, requiring login
5. google it & find a page on phpbb forums
6. Make afile.php with code in it as follows:

Code: Select all
<?php

define('IN_PHPBB', true);
$phpbb_root_path = './';  // Relative to your phpBB installation path
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

$cache->purge();
$auth->acl_clear_prefetch();

die( 'done' ); 

7. Open it in browser - it says "Done"
8. Fixed! board lets us back in again.


"But my head's all messed up, so you better driive brother"
User avatar

[DRuG]NikT
[DRuG] cofounder & your host

Status:
Check out the downloads and members areas on drugcrew.com

[DRuG] cofounder & your host
[DRuG] coleader
[DRuG] member
DRuG server admin
[AGS] member
]DR[ member
 
Posts: 2532
Joined: Sat Jul 28, 2007 10:39 am
Location: Melbourne, Victoria, Australia


Return to Technical support

Who is online

Users browsing this forum: No registered users and 1 guest